diff --git a/Dataplex/metadata/V1/Catalog.php b/Dataplex/metadata/V1/Catalog.php index 1f1ca35e5621..cf7ececbce98 100644 --- a/Dataplex/metadata/V1/Catalog.php +++ b/Dataplex/metadata/V1/Catalog.php @@ -26,7 +26,7 @@ public static function initOnce() { \GPBMetadata\Google\Protobuf\Timestamp::initOnce(); $pool->internalAddGeneratedFile( ' -¢p +În &google/cloud/dataplex/v1/catalog.protogoogle.cloud.dataplex.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto&google/cloud/dataplex/v1/service.proto#google/longrunning/operations.protogoogle/protobuf/empty.proto google/protobuf/field_mask.protogoogle/protobuf/struct.protogoogle/protobuf/timestamp.proto"Ó AspectType8 @@ -297,16 +297,8 @@ public static function initOnce() { page_token ( BàA order_by ( BàA -scope ( BàA"Ê -SearchEntriesResult -entry ( B - display_name ( B - -entry_type ( B3 - modify_time ( 2.google.protobuf.TimestampB -fully_qualified_name ( B - description ( B -relative_resource ( B +scope ( BàA"ö +SearchEntriesResult linked_resource ( 7 dataplex_entry ( 2.google.cloud.dataplex.v1.EntryH snippets ( 26.google.cloud.dataplex.v1.SearchEntriesResult.SnippetsC diff --git a/Dataplex/metadata/V1/DataQuality.php b/Dataplex/metadata/V1/DataQuality.php index b56b8520e8f3..a0ce2465cea5 100644 Binary files a/Dataplex/metadata/V1/DataQuality.php and b/Dataplex/metadata/V1/DataQuality.php differ diff --git a/Dataplex/metadata/V1/Logs.php b/Dataplex/metadata/V1/Logs.php index a451da03225a..f8a7f110a7f9 100644 Binary files a/Dataplex/metadata/V1/Logs.php and b/Dataplex/metadata/V1/Logs.php differ diff --git a/Dataplex/src/V1/DataQualityRule.php b/Dataplex/src/V1/DataQualityRule.php index 2bdc8fcf9ab3..9c578a57ff45 100644 --- a/Dataplex/src/V1/DataQualityRule.php +++ b/Dataplex/src/V1/DataQualityRule.php @@ -99,6 +99,9 @@ class DataQualityRule extends \Google\Protobuf\Internal\Message * @type \Google\Cloud\Dataplex\V1\DataQualityRule\TableConditionExpectation $table_condition_expectation * Aggregate rule which evaluates whether the provided expression is true * for a table. + * @type \Google\Cloud\Dataplex\V1\DataQualityRule\SqlAssertion $sql_assertion + * Aggregate rule which evaluates the number of rows returned for the + * provided statement. * @type string $column * Optional. The unnested column which this rule is evaluated against. * @type bool $ignore_null @@ -396,6 +399,39 @@ public function setTableConditionExpectation($var) return $this; } + /** + * Aggregate rule which evaluates the number of rows returned for the + * provided statement. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityRule.SqlAssertion sql_assertion = 202; + * @return \Google\Cloud\Dataplex\V1\DataQualityRule\SqlAssertion|null + */ + public function getSqlAssertion() + { + return $this->readOneof(202); + } + + public function hasSqlAssertion() + { + return $this->hasOneof(202); + } + + /** + * Aggregate rule which evaluates the number of rows returned for the + * provided statement. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityRule.SqlAssertion sql_assertion = 202; + * @param \Google\Cloud\Dataplex\V1\DataQualityRule\SqlAssertion $var + * @return $this + */ + public function setSqlAssertion($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataQualityRule\SqlAssertion::class); + $this->writeOneof(202, $var); + + return $this; + } + /** * Optional. The unnested column which this rule is evaluated against. * diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/SqlAssertion.php b/Dataplex/src/V1/DataQualityRule/SqlAssertion.php similarity index 90% rename from owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/SqlAssertion.php rename to Dataplex/src/V1/DataQualityRule/SqlAssertion.php index e86d9826bfd8..5c25ce0b008d 100644 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/SqlAssertion.php +++ b/Dataplex/src/V1/DataQualityRule/SqlAssertion.php @@ -27,7 +27,7 @@ class SqlAssertion extends \Google\Protobuf\Internal\Message * * Generated from protobuf field string sql_statement = 1 [(.google.api.field_behavior) = OPTIONAL]; */ - protected $sql_statement = ''; + private $sql_statement = ''; /** * Constructor. @@ -72,6 +72,4 @@ public function setSqlStatement($var) } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SqlAssertion::class, \Google\Cloud\Dataplex\V1\DataQualityRule_SqlAssertion::class); diff --git a/Dataplex/src/V1/DataQualityRuleResult.php b/Dataplex/src/V1/DataQualityRuleResult.php index c9d438e3b7f4..5fac421ec514 100644 --- a/Dataplex/src/V1/DataQualityRuleResult.php +++ b/Dataplex/src/V1/DataQualityRuleResult.php @@ -66,6 +66,14 @@ class DataQualityRuleResult extends \Google\Protobuf\Internal\Message * Generated from protobuf field string failing_rows_query = 10; */ private $failing_rows_query = ''; + /** + * Output only. The number of rows returned by the sql statement in the + * SqlAssertion rule. + * This field is only valid for SqlAssertion rules. + * + * Generated from protobuf field int64 assertion_row_count = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $assertion_row_count = 0; /** * Constructor. @@ -96,6 +104,10 @@ class DataQualityRuleResult extends \Google\Protobuf\Internal\Message * @type string $failing_rows_query * The query to find rows that did not pass this rule. * This field is only valid for row-level type rules. + * @type int|string $assertion_row_count + * Output only. The number of rows returned by the sql statement in the + * SqlAssertion rule. + * This field is only valid for SqlAssertion rules. * } */ public function __construct($data = NULL) { @@ -313,5 +325,35 @@ public function setFailingRowsQuery($var) return $this; } + /** + * Output only. The number of rows returned by the sql statement in the + * SqlAssertion rule. + * This field is only valid for SqlAssertion rules. + * + * Generated from protobuf field int64 assertion_row_count = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getAssertionRowCount() + { + return $this->assertion_row_count; + } + + /** + * Output only. The number of rows returned by the sql statement in the + * SqlAssertion rule. + * This field is only valid for SqlAssertion rules. + * + * Generated from protobuf field int64 assertion_row_count = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setAssertionRowCount($var) + { + GPBUtil::checkInt64($var); + $this->assertion_row_count = $var; + + return $this; + } + } diff --git a/Dataplex/src/V1/DataQualityScanRuleResult.php b/Dataplex/src/V1/DataQualityScanRuleResult.php index e59fb96f94a9..fb49f3af175a 100644 --- a/Dataplex/src/V1/DataQualityScanRuleResult.php +++ b/Dataplex/src/V1/DataQualityScanRuleResult.php @@ -90,6 +90,13 @@ class DataQualityScanRuleResult extends \Google\Protobuf\Internal\Message * Generated from protobuf field int64 null_row_count = 12; */ private $null_row_count = 0; + /** + * The number of rows returned by the sql statement in the SqlAssertion rule. + * This field is only valid for SqlAssertion rules. + * + * Generated from protobuf field int64 assertion_row_count = 13; + */ + private $assertion_row_count = 0; /** * Constructor. @@ -123,6 +130,9 @@ class DataQualityScanRuleResult extends \Google\Protobuf\Internal\Message * This field is only valid for rules of PER_ROW evaluation type. * @type int|string $null_row_count * The number of rows with null values in the specified column. + * @type int|string $assertion_row_count + * The number of rows returned by the sql statement in the SqlAssertion rule. + * This field is only valid for SqlAssertion rules. * } */ public function __construct($data = NULL) { @@ -446,5 +456,33 @@ public function setNullRowCount($var) return $this; } + /** + * The number of rows returned by the sql statement in the SqlAssertion rule. + * This field is only valid for SqlAssertion rules. + * + * Generated from protobuf field int64 assertion_row_count = 13; + * @return int|string + */ + public function getAssertionRowCount() + { + return $this->assertion_row_count; + } + + /** + * The number of rows returned by the sql statement in the SqlAssertion rule. + * This field is only valid for SqlAssertion rules. + * + * Generated from protobuf field int64 assertion_row_count = 13; + * @param int|string $var + * @return $this + */ + public function setAssertionRowCount($var) + { + GPBUtil::checkInt64($var); + $this->assertion_row_count = $var; + + return $this; + } + } diff --git a/Dataplex/src/V1/DataQualityScanRuleResult/RuleType.php b/Dataplex/src/V1/DataQualityScanRuleResult/RuleType.php index bc63f6c601a9..51434ffb5c35 100644 --- a/Dataplex/src/V1/DataQualityScanRuleResult/RuleType.php +++ b/Dataplex/src/V1/DataQualityScanRuleResult/RuleType.php @@ -75,6 +75,13 @@ class RuleType * Generated from protobuf enum UNIQUENESS_EXPECTATION = 8; */ const UNIQUENESS_EXPECTATION = 8; + /** + * Please see + * https://cloud.google.com/dataplex/docs/reference/rest/v1/DataQualityRule#sqlAssertion. + * + * Generated from protobuf enum SQL_ASSERTION = 9; + */ + const SQL_ASSERTION = 9; private static $valueToName = [ self::RULE_TYPE_UNSPECIFIED => 'RULE_TYPE_UNSPECIFIED', @@ -86,6 +93,7 @@ class RuleType self::STATISTIC_RANGE_EXPECTATION => 'STATISTIC_RANGE_EXPECTATION', self::TABLE_CONDITION_EXPECTATION => 'TABLE_CONDITION_EXPECTATION', self::UNIQUENESS_EXPECTATION => 'UNIQUENESS_EXPECTATION', + self::SQL_ASSERTION => 'SQL_ASSERTION', ]; public static function name($value) diff --git a/Dataplex/src/V1/Entry.php b/Dataplex/src/V1/Entry.php index 4880792df5f1..33e3351824f3 100644 --- a/Dataplex/src/V1/Entry.php +++ b/Dataplex/src/V1/Entry.php @@ -43,9 +43,12 @@ class Entry extends \Google\Protobuf\Internal\Message */ private $update_time = null; /** - * Optional. The Aspects attached to the Entry. The key is either the resource - * name of the aspect type (if the aspect is attached directly to the entry) - * or "aspectType@path" if the aspect is attached to an entry's path. + * Optional. The Aspects attached to the Entry. + * The format for the key can be one of the following: + * 1. {projectId}.{locationId}.{aspectTypeId} (if the aspect is attached + * directly to the entry) + * 2. {projectId}.{locationId}.{aspectTypeId}@{path} (if the aspect is + * attached to an entry's path) * * Generated from protobuf field map aspects = 9 [(.google.api.field_behavior) = OPTIONAL]; */ @@ -87,9 +90,12 @@ class Entry extends \Google\Protobuf\Internal\Message * @type \Google\Protobuf\Timestamp $update_time * Output only. The time when the Entry was last updated. * @type array|\Google\Protobuf\Internal\MapField $aspects - * Optional. The Aspects attached to the Entry. The key is either the resource - * name of the aspect type (if the aspect is attached directly to the entry) - * or "aspectType@path" if the aspect is attached to an entry's path. + * Optional. The Aspects attached to the Entry. + * The format for the key can be one of the following: + * 1. {projectId}.{locationId}.{aspectTypeId} (if the aspect is attached + * directly to the entry) + * 2. {projectId}.{locationId}.{aspectTypeId}@{path} (if the aspect is + * attached to an entry's path) * @type string $parent_entry * Optional. Immutable. The resource name of the parent entry. * @type string $fully_qualified_name @@ -233,9 +239,12 @@ public function setUpdateTime($var) } /** - * Optional. The Aspects attached to the Entry. The key is either the resource - * name of the aspect type (if the aspect is attached directly to the entry) - * or "aspectType@path" if the aspect is attached to an entry's path. + * Optional. The Aspects attached to the Entry. + * The format for the key can be one of the following: + * 1. {projectId}.{locationId}.{aspectTypeId} (if the aspect is attached + * directly to the entry) + * 2. {projectId}.{locationId}.{aspectTypeId}@{path} (if the aspect is + * attached to an entry's path) * * Generated from protobuf field map aspects = 9 [(.google.api.field_behavior) = OPTIONAL]; * @return \Google\Protobuf\Internal\MapField @@ -246,9 +255,12 @@ public function getAspects() } /** - * Optional. The Aspects attached to the Entry. The key is either the resource - * name of the aspect type (if the aspect is attached directly to the entry) - * or "aspectType@path" if the aspect is attached to an entry's path. + * Optional. The Aspects attached to the Entry. + * The format for the key can be one of the following: + * 1. {projectId}.{locationId}.{aspectTypeId} (if the aspect is attached + * directly to the entry) + * 2. {projectId}.{locationId}.{aspectTypeId}@{path} (if the aspect is + * attached to an entry's path) * * Generated from protobuf field map aspects = 9 [(.google.api.field_behavior) = OPTIONAL]; * @param array|\Google\Protobuf\Internal\MapField $var diff --git a/Dataplex/src/V1/Gapic/CatalogServiceGapicClient.php b/Dataplex/src/V1/Gapic/CatalogServiceGapicClient.php index ecd726ce8d78..3407700b8e35 100644 --- a/Dataplex/src/V1/Gapic/CatalogServiceGapicClient.php +++ b/Dataplex/src/V1/Gapic/CatalogServiceGapicClient.php @@ -1509,15 +1509,17 @@ public function listAspectTypes($parent, array $optionalArgs = []) * Optional. A filter on the entries to return. * Filters are case-sensitive. * The request can be filtered by the following fields: - * entry_type, display_name. + * entry_type, entry_source.display_name. * The comparison operators are =, !=, <, >, <=, >= (strings are compared * according to lexical order) * The logical operators AND, OR, NOT can be used - * in the filter. Example filter expressions: - * "display_name=AnExampleDisplayName" + * in the filter. Wildcard "*" can be used, but for entry_type the full + * project id or number needs to be provided. Example filter expressions: + * "entry_source.display_name=AnExampleDisplayName" * "entry_type=projects/example-project/locations/global/entryTypes/example-entry_type" - * "entry_type=projects/a* OR "entry_type=projects/k*" - * "NOT display_name=AnotherExampleDisplayName" + * "entry_type=projects/example-project/locations/us/entryTypes/a* OR + * entry_type=projects/another-project/locations/*" + * "NOT entry_source.display_name=AnotherExampleDisplayName" * @type RetrySettings|array $retrySettings * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an * associative array of retry settings parameters. See the documentation on diff --git a/Dataplex/src/V1/ListEntriesRequest.php b/Dataplex/src/V1/ListEntriesRequest.php index a6e10d77dd62..1d7a191eb49d 100644 --- a/Dataplex/src/V1/ListEntriesRequest.php +++ b/Dataplex/src/V1/ListEntriesRequest.php @@ -34,15 +34,17 @@ class ListEntriesRequest extends \Google\Protobuf\Internal\Message * Optional. A filter on the entries to return. * Filters are case-sensitive. * The request can be filtered by the following fields: - * entry_type, display_name. + * entry_type, entry_source.display_name. * The comparison operators are =, !=, <, >, <=, >= (strings are compared * according to lexical order) * The logical operators AND, OR, NOT can be used - * in the filter. Example filter expressions: - * "display_name=AnExampleDisplayName" + * in the filter. Wildcard "*" can be used, but for entry_type the full + * project id or number needs to be provided. Example filter expressions: + * "entry_source.display_name=AnExampleDisplayName" * "entry_type=projects/example-project/locations/global/entryTypes/example-entry_type" - * "entry_type=projects/a* OR "entry_type=projects/k*" - * "NOT display_name=AnotherExampleDisplayName" + * "entry_type=projects/example-project/locations/us/entryTypes/a* OR + * entry_type=projects/another-project/locations/*" + * "NOT entry_source.display_name=AnotherExampleDisplayName" * * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; */ @@ -79,15 +81,17 @@ public static function build(string $parent): self * Optional. A filter on the entries to return. * Filters are case-sensitive. * The request can be filtered by the following fields: - * entry_type, display_name. + * entry_type, entry_source.display_name. * The comparison operators are =, !=, <, >, <=, >= (strings are compared * according to lexical order) * The logical operators AND, OR, NOT can be used - * in the filter. Example filter expressions: - * "display_name=AnExampleDisplayName" + * in the filter. Wildcard "*" can be used, but for entry_type the full + * project id or number needs to be provided. Example filter expressions: + * "entry_source.display_name=AnExampleDisplayName" * "entry_type=projects/example-project/locations/global/entryTypes/example-entry_type" - * "entry_type=projects/a* OR "entry_type=projects/k*" - * "NOT display_name=AnotherExampleDisplayName" + * "entry_type=projects/example-project/locations/us/entryTypes/a* OR + * entry_type=projects/another-project/locations/*" + * "NOT entry_source.display_name=AnotherExampleDisplayName" * } */ public function __construct($data = NULL) { @@ -175,15 +179,17 @@ public function setPageToken($var) * Optional. A filter on the entries to return. * Filters are case-sensitive. * The request can be filtered by the following fields: - * entry_type, display_name. + * entry_type, entry_source.display_name. * The comparison operators are =, !=, <, >, <=, >= (strings are compared * according to lexical order) * The logical operators AND, OR, NOT can be used - * in the filter. Example filter expressions: - * "display_name=AnExampleDisplayName" + * in the filter. Wildcard "*" can be used, but for entry_type the full + * project id or number needs to be provided. Example filter expressions: + * "entry_source.display_name=AnExampleDisplayName" * "entry_type=projects/example-project/locations/global/entryTypes/example-entry_type" - * "entry_type=projects/a* OR "entry_type=projects/k*" - * "NOT display_name=AnotherExampleDisplayName" + * "entry_type=projects/example-project/locations/us/entryTypes/a* OR + * entry_type=projects/another-project/locations/*" + * "NOT entry_source.display_name=AnotherExampleDisplayName" * * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; * @return string @@ -197,15 +203,17 @@ public function getFilter() * Optional. A filter on the entries to return. * Filters are case-sensitive. * The request can be filtered by the following fields: - * entry_type, display_name. + * entry_type, entry_source.display_name. * The comparison operators are =, !=, <, >, <=, >= (strings are compared * according to lexical order) * The logical operators AND, OR, NOT can be used - * in the filter. Example filter expressions: - * "display_name=AnExampleDisplayName" + * in the filter. Wildcard "*" can be used, but for entry_type the full + * project id or number needs to be provided. Example filter expressions: + * "entry_source.display_name=AnExampleDisplayName" * "entry_type=projects/example-project/locations/global/entryTypes/example-entry_type" - * "entry_type=projects/a* OR "entry_type=projects/k*" - * "NOT display_name=AnotherExampleDisplayName" + * "entry_type=projects/example-project/locations/us/entryTypes/a* OR + * entry_type=projects/another-project/locations/*" + * "NOT entry_source.display_name=AnotherExampleDisplayName" * * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var diff --git a/Dataplex/src/V1/SearchEntriesResult.php b/Dataplex/src/V1/SearchEntriesResult.php index cb03bb6f617e..9bc74df9e5b0 100644 --- a/Dataplex/src/V1/SearchEntriesResult.php +++ b/Dataplex/src/V1/SearchEntriesResult.php @@ -15,55 +15,6 @@ */ class SearchEntriesResult extends \Google\Protobuf\Internal\Message { - /** - * Resource name of the entry. - * - * Generated from protobuf field string entry = 1 [deprecated = true]; - * @deprecated - */ - protected $entry = ''; - /** - * Display name. - * - * Generated from protobuf field string display_name = 2 [deprecated = true]; - * @deprecated - */ - protected $display_name = ''; - /** - * The entry type. - * - * Generated from protobuf field string entry_type = 3 [deprecated = true]; - * @deprecated - */ - protected $entry_type = ''; - /** - * The last modification timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp modify_time = 4 [deprecated = true]; - * @deprecated - */ - protected $modify_time = null; - /** - * Fully qualified name. - * - * Generated from protobuf field string fully_qualified_name = 5 [deprecated = true]; - * @deprecated - */ - protected $fully_qualified_name = ''; - /** - * Entry description. - * - * Generated from protobuf field string description = 6 [deprecated = true]; - * @deprecated - */ - protected $description = ''; - /** - * Relative resource name. - * - * Generated from protobuf field string relative_resource = 7 [deprecated = true]; - * @deprecated - */ - protected $relative_resource = ''; /** * Linked resource name. * @@ -89,20 +40,6 @@ class SearchEntriesResult extends \Google\Protobuf\Internal\Message * @param array $data { * Optional. Data for populating the Message object. * - * @type string $entry - * Resource name of the entry. - * @type string $display_name - * Display name. - * @type string $entry_type - * The entry type. - * @type \Google\Protobuf\Timestamp $modify_time - * The last modification timestamp. - * @type string $fully_qualified_name - * Fully qualified name. - * @type string $description - * Entry description. - * @type string $relative_resource - * Relative resource name. * @type string $linked_resource * Linked resource name. * @type \Google\Cloud\Dataplex\V1\Entry $dataplex_entry @@ -116,228 +53,6 @@ public function __construct($data = NULL) { parent::__construct($data); } - /** - * Resource name of the entry. - * - * Generated from protobuf field string entry = 1 [deprecated = true]; - * @return string - * @deprecated - */ - public function getEntry() - { - @trigger_error('entry is deprecated.', E_USER_DEPRECATED); - return $this->entry; - } - - /** - * Resource name of the entry. - * - * Generated from protobuf field string entry = 1 [deprecated = true]; - * @param string $var - * @return $this - * @deprecated - */ - public function setEntry($var) - { - @trigger_error('entry is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkString($var, True); - $this->entry = $var; - - return $this; - } - - /** - * Display name. - * - * Generated from protobuf field string display_name = 2 [deprecated = true]; - * @return string - * @deprecated - */ - public function getDisplayName() - { - @trigger_error('display_name is deprecated.', E_USER_DEPRECATED); - return $this->display_name; - } - - /** - * Display name. - * - * Generated from protobuf field string display_name = 2 [deprecated = true]; - * @param string $var - * @return $this - * @deprecated - */ - public function setDisplayName($var) - { - @trigger_error('display_name is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * The entry type. - * - * Generated from protobuf field string entry_type = 3 [deprecated = true]; - * @return string - * @deprecated - */ - public function getEntryType() - { - @trigger_error('entry_type is deprecated.', E_USER_DEPRECATED); - return $this->entry_type; - } - - /** - * The entry type. - * - * Generated from protobuf field string entry_type = 3 [deprecated = true]; - * @param string $var - * @return $this - * @deprecated - */ - public function setEntryType($var) - { - @trigger_error('entry_type is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkString($var, True); - $this->entry_type = $var; - - return $this; - } - - /** - * The last modification timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp modify_time = 4 [deprecated = true]; - * @return \Google\Protobuf\Timestamp|null - * @deprecated - */ - public function getModifyTime() - { - @trigger_error('modify_time is deprecated.', E_USER_DEPRECATED); - return $this->modify_time; - } - - public function hasModifyTime() - { - @trigger_error('modify_time is deprecated.', E_USER_DEPRECATED); - return isset($this->modify_time); - } - - public function clearModifyTime() - { - @trigger_error('modify_time is deprecated.', E_USER_DEPRECATED); - unset($this->modify_time); - } - - /** - * The last modification timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp modify_time = 4 [deprecated = true]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - * @deprecated - */ - public function setModifyTime($var) - { - @trigger_error('modify_time is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->modify_time = $var; - - return $this; - } - - /** - * Fully qualified name. - * - * Generated from protobuf field string fully_qualified_name = 5 [deprecated = true]; - * @return string - * @deprecated - */ - public function getFullyQualifiedName() - { - @trigger_error('fully_qualified_name is deprecated.', E_USER_DEPRECATED); - return $this->fully_qualified_name; - } - - /** - * Fully qualified name. - * - * Generated from protobuf field string fully_qualified_name = 5 [deprecated = true]; - * @param string $var - * @return $this - * @deprecated - */ - public function setFullyQualifiedName($var) - { - @trigger_error('fully_qualified_name is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkString($var, True); - $this->fully_qualified_name = $var; - - return $this; - } - - /** - * Entry description. - * - * Generated from protobuf field string description = 6 [deprecated = true]; - * @return string - * @deprecated - */ - public function getDescription() - { - @trigger_error('description is deprecated.', E_USER_DEPRECATED); - return $this->description; - } - - /** - * Entry description. - * - * Generated from protobuf field string description = 6 [deprecated = true]; - * @param string $var - * @return $this - * @deprecated - */ - public function setDescription($var) - { - @trigger_error('description is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Relative resource name. - * - * Generated from protobuf field string relative_resource = 7 [deprecated = true]; - * @return string - * @deprecated - */ - public function getRelativeResource() - { - @trigger_error('relative_resource is deprecated.', E_USER_DEPRECATED); - return $this->relative_resource; - } - - /** - * Relative resource name. - * - * Generated from protobuf field string relative_resource = 7 [deprecated = true]; - * @param string $var - * @return $this - * @deprecated - */ - public function setRelativeResource($var) - { - @trigger_error('relative_resource is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkString($var, True); - $this->relative_resource = $var; - - return $this; - } - /** * Linked resource name. * diff --git a/owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/Analyze.php b/owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/Analyze.php deleted file mode 100644 index e8a576245010..000000000000 Binary files a/owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/Analyze.php and /dev/null differ diff --git a/owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/Catalog.php b/owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/Catalog.php deleted file mode 100644 index cf7ececbce98..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/Catalog.php +++ /dev/null @@ -1,369 +0,0 @@ -internalAddGeneratedFile( - ' -În -&google/cloud/dataplex/v1/catalog.protogoogle.cloud.dataplex.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto&google/cloud/dataplex/v1/service.proto#google/longrunning/operations.protogoogle/protobuf/empty.proto google/protobuf/field_mask.protogoogle/protobuf/struct.protogoogle/protobuf/timestamp.proto"Ó - -AspectType8 -name ( B*àAúA$ -"dataplex.googleapis.com/AspectType -uid ( BàA4 - create_time ( 2.google.protobuf.TimestampBàA4 - update_time ( 2.google.protobuf.TimestampBàA - description ( BàA - display_name ( BàAE -labels ( 20.google.cloud.dataplex.v1.AspectType.LabelsEntryBàA -etag ( N - authorization4 ( 22.google.cloud.dataplex.v1.AspectType.AuthorizationBàAU -metadata_template5 ( 25.google.cloud.dataplex.v1.AspectType.MetadataTemplateBàAG -transfer_statusÊ (2(.google.cloud.dataplex.v1.TransferStatusBàA6 - Authorization% -alternate_use_permission ( BàA¤ -MetadataTemplate -index (BàA -name ( BàA -type ( BàAQ - record_fields ( 25.google.cloud.dataplex.v1.AspectType.MetadataTemplateBàAY - enum_values ( 2?.google.cloud.dataplex.v1.AspectType.MetadataTemplate.EnumValueBàAM - map_items - ( 25.google.cloud.dataplex.v1.AspectType.MetadataTemplateBàAO - array_items ( 25.google.cloud.dataplex.v1.AspectType.MetadataTemplateBàA -type_id ( BàA -type_ref ( BàA[ - constraints2 ( 2A.google.cloud.dataplex.v1.AspectType.MetadataTemplate.ConstraintsBàA[ - annotations3 ( 2A.google.cloud.dataplex.v1.AspectType.MetadataTemplate.AnnotationsBàAK - EnumValue -index (BàA -name ( BàA - -deprecated ( BàA$ - Constraints -required (BàA­ - Annotations - -deprecated ( BàA - display_name ( BàA - description ( BàA - display_order (BàA - string_type ( BàA - string_values ( BàA- - LabelsEntry -key (  -value ( :8:„êA€ -"dataplex.googleapis.com/AspectTypeAprojects/{project}/locations/{location}/aspectTypes/{aspect_type}* aspectTypes2 -aspectType"Í - -EntryGroup8 -name ( B*àAúA$ -"dataplex.googleapis.com/EntryGroup -uid ( BàA4 - create_time ( 2.google.protobuf.TimestampBàA4 - update_time ( 2.google.protobuf.TimestampBàA - description ( BàA - display_name ( BàAE -labels ( 20.google.cloud.dataplex.v1.EntryGroup.LabelsEntryBàA -etag ( G -transfer_statusÊ (2(.google.cloud.dataplex.v1.TransferStatusBàA- - LabelsEntry -key (  -value ( :8:„êA€ -"dataplex.googleapis.com/EntryGroupAprojects/{project}/locations/{location}/entryGroups/{entry_group}* entryGroups2 -entryGroup"Ü - EntryType7 -name ( B)àAúA# -!dataplex.googleapis.com/EntryType -uid ( BàA4 - create_time ( 2.google.protobuf.TimestampBàA4 - update_time ( 2.google.protobuf.TimestampBàA - description ( BàA - display_name ( BàAD -labels ( 2/.google.cloud.dataplex.v1.EntryType.LabelsEntryBàA -etag ( BàA - type_aliases ( BàA -platform - ( BàA -system ( BàAH -required_aspects2 ( 2..google.cloud.dataplex.v1.EntryType.AspectInfoM - authorization3 ( 21.google.cloud.dataplex.v1.EntryType.AuthorizationBàAC - -AspectInfo5 -type ( B\'úA$ -"dataplex.googleapis.com/AspectType6 - Authorization% -alternate_use_permission ( BàA- - LabelsEntry -key (  -value ( :8:~êA{ -!dataplex.googleapis.com/EntryType?projects/{project}/locations/{location}/entryTypes/{entry_type}* -entryTypes2 entryType"‘ -Aspect - aspect_type ( BàA -path ( BàA4 - create_time ( 2.google.protobuf.TimestampBàA4 - update_time ( 2.google.protobuf.TimestampBàA* -data ( 2.google.protobuf.StructBàAB - aspect_source ( 2&.google.cloud.dataplex.v1.AspectSourceBàA"p - AspectSource/ - create_time - ( 2.google.protobuf.Timestamp/ - update_time ( 2.google.protobuf.Timestamp"Ä -Entry -name ( BàA - -entry_type ( BàAàA4 - create_time ( 2.google.protobuf.TimestampBàA4 - update_time ( 2.google.protobuf.TimestampBàAB -aspects ( 2,.google.cloud.dataplex.v1.Entry.AspectsEntryBàA - parent_entry - ( BàAàA! -fully_qualified_name ( BàA@ - entry_source ( 2%.google.cloud.dataplex.v1.EntrySourceBàAP - AspectsEntry -key ( / -value ( 2 .google.cloud.dataplex.v1.Aspect:8:†êA‚ -dataplex.googleapis.com/EntryQprojects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}*entries2entry"º - EntrySource -resource (  -system (  -platform (  - display_name (  - description ( A -labels ( 21.google.cloud.dataplex.v1.EntrySource.LabelsEntryF - ancestors ( 2..google.cloud.dataplex.v1.EntrySource.AncestorBàA/ - create_time - ( 2.google.protobuf.Timestamp/ - update_time ( 2.google.protobuf.Timestamp0 -Ancestor -name ( BàA -type ( BàA- - LabelsEntry -key (  -value ( :8"Í -CreateEntryGroupRequest9 -parent ( B)àAúA# -!locations.googleapis.com/Location -entry_group_id ( BàA> - entry_group ( 2$.google.cloud.dataplex.v1.EntryGroupBàA - validate_only (BàA"« -UpdateEntryGroupRequest> - entry_group ( 2$.google.cloud.dataplex.v1.EntryGroupBàA4 - update_mask ( 2.google.protobuf.FieldMaskBàA - validate_only (BàA"f -DeleteEntryGroupRequest8 -name ( B*àAúA$ -"dataplex.googleapis.com/EntryGroup -etag ( BàA"° -ListEntryGroupsRequest9 -parent ( B)àAúA# -!locations.googleapis.com/Location - page_size (BàA - -page_token ( BàA -filter ( BàA -order_by ( BàA" -ListEntryGroupsResponse: - entry_groups ( 2$.google.cloud.dataplex.v1.EntryGroup -next_page_token (  -unreachable_locations ( "P -GetEntryGroupRequest8 -name ( B*àAúA$ -"dataplex.googleapis.com/EntryGroup"É -CreateEntryTypeRequest9 -parent ( B)àAúA# -!locations.googleapis.com/Location - entry_type_id ( BàA< - -entry_type ( 2#.google.cloud.dataplex.v1.EntryTypeBàA - validate_only (BàA"¨ -UpdateEntryTypeRequest< - -entry_type ( 2#.google.cloud.dataplex.v1.EntryTypeBàA4 - update_mask ( 2.google.protobuf.FieldMaskBàA - validate_only (BàA"d -DeleteEntryTypeRequest7 -name ( B)àAúA# -!dataplex.googleapis.com/EntryType -etag ( BàA"¯ -ListEntryTypesRequest9 -parent ( B)àAúA# -!locations.googleapis.com/Location - page_size (BàA - -page_token ( BàA -filter ( BàA -order_by ( BàA"Š -ListEntryTypesResponse8 - entry_types ( 2#.google.cloud.dataplex.v1.EntryType -next_page_token (  -unreachable_locations ( "N -GetEntryTypeRequest7 -name ( B)àAúA# -!dataplex.googleapis.com/EntryType"Í -CreateAspectTypeRequest9 -parent ( B)àAúA# -!locations.googleapis.com/Location -aspect_type_id ( BàA> - aspect_type ( 2$.google.cloud.dataplex.v1.AspectTypeBàA - validate_only (BàA"« -UpdateAspectTypeRequest> - aspect_type ( 2$.google.cloud.dataplex.v1.AspectTypeBàA4 - update_mask ( 2.google.protobuf.FieldMaskBàA - validate_only (BàA"f -DeleteAspectTypeRequest8 -name ( B*àAúA$ -"dataplex.googleapis.com/AspectType -etag ( BàA"° -ListAspectTypesRequest9 -parent ( B)àAúA# -!locations.googleapis.com/Location - page_size (BàA - -page_token ( BàA -filter ( BàA -order_by ( BàA" -ListAspectTypesResponse: - aspect_types ( 2$.google.cloud.dataplex.v1.AspectType -next_page_token (  -unreachable_locations ( "P -GetAspectTypeRequest8 -name ( B*àAúA$ -"dataplex.googleapis.com/AspectType"œ -CreateEntryRequest: -parent ( B*àAúA$ -"dataplex.googleapis.com/EntryGroup -entry_id ( BàA3 -entry ( 2.google.cloud.dataplex.v1.EntryBàA"Ú -UpdateEntryRequest3 -entry ( 2.google.cloud.dataplex.v1.EntryBàA4 - update_mask ( 2.google.protobuf.FieldMaskBàA - allow_missing (BàA# -delete_missing_aspects (BàA - aspect_keys ( BàA"I -DeleteEntryRequest3 -name ( B%àAúA -dataplex.googleapis.com/Entry"– -ListEntriesRequest: -parent ( B*àAúA$ -"dataplex.googleapis.com/EntryGroup - page_size (BàA - -page_token ( BàA -filter ( BàA"` -ListEntriesResponse0 -entries ( 2.google.cloud.dataplex.v1.Entry -next_page_token ( "­ -GetEntryRequest3 -name ( B%àAúA -dataplex.googleapis.com/Entry6 -view (2#.google.cloud.dataplex.v1.EntryViewBàA - aspect_types ( BàA -paths ( BàA"Ä -LookupEntryRequest -name ( BàA6 -view (2#.google.cloud.dataplex.v1.EntryViewBàA - aspect_types ( BàA -paths ( BàA4 -entry ( B%àAúA -dataplex.googleapis.com/Entry"™ -SearchEntriesRequest -name ( BàA -query ( BàA - page_size (BàA - -page_token ( BàA -order_by ( BàA -scope ( BàA"ö -SearchEntriesResult -linked_resource ( 7 -dataplex_entry ( 2.google.cloud.dataplex.v1.EntryH -snippets ( 26.google.cloud.dataplex.v1.SearchEntriesResult.SnippetsC -Snippets7 -dataplex_entry ( 2.google.cloud.dataplex.v1.Entry"™ -SearchEntriesResponse> -results ( 2-.google.cloud.dataplex.v1.SearchEntriesResult - -total_size ( -next_page_token (  - unreachable ( *Q - EntryView -ENTRY_VIEW_UNSPECIFIED -BASIC -FULL - -CUSTOM -ALL*p -TransferStatus -TRANSFER_STATUS_UNSPECIFIED -TRANSFER_STATUS_MIGRATED -TRANSFER_STATUS_TRANSFERRED2‚# -CatalogServiceê -CreateEntryType0.google.cloud.dataplex.v1.CreateEntryTypeRequest.google.longrunning.Operation"…ÊA - EntryTypeOperationMetadataÚAparent,entry_type,entry_type_id‚Óä“<"./v1/{parent=projects/*/locations/*}/entryTypes: -entry_typeì -UpdateEntryType0.google.cloud.dataplex.v1.UpdateEntryTypeRequest.google.longrunning.Operation"‡ÊA - EntryTypeOperationMetadataÚAentry_type,update_mask‚Óä“G29/v1/{entry_type.name=projects/*/locations/*/entryTypes/*}: -entry_typeÎ -DeleteEntryType0.google.cloud.dataplex.v1.DeleteEntryTypeRequest.google.longrunning.Operation"jÊA* -google.protobuf.EmptyOperationMetadataÚAname‚Óä“0*./v1/{name=projects/*/locations/*/entryTypes/*}´ -ListEntryTypes/.google.cloud.dataplex.v1.ListEntryTypesRequest0.google.cloud.dataplex.v1.ListEntryTypesResponse"?ÚAparent‚Óä“0./v1/{parent=projects/*/locations/*}/entryTypes¡ - GetEntryType-.google.cloud.dataplex.v1.GetEntryTypeRequest#.google.cloud.dataplex.v1.EntryType"=ÚAname‚Óä“0./v1/{name=projects/*/locations/*/entryTypes/*}ñ -CreateAspectType1.google.cloud.dataplex.v1.CreateAspectTypeRequest.google.longrunning.Operation"ŠÊA - -AspectTypeOperationMetadataÚA!parent,aspect_type,aspect_type_id‚Óä“>"//v1/{parent=projects/*/locations/*}/aspectTypes: aspect_typeó -UpdateAspectType1.google.cloud.dataplex.v1.UpdateAspectTypeRequest.google.longrunning.Operation"ŒÊA - -AspectTypeOperationMetadataÚAaspect_type,update_mask‚Óä“J2;/v1/{aspect_type.name=projects/*/locations/*/aspectTypes/*}: aspect_typeÑ -DeleteAspectType1.google.cloud.dataplex.v1.DeleteAspectTypeRequest.google.longrunning.Operation"kÊA* -google.protobuf.EmptyOperationMetadataÚAname‚Óä“1*//v1/{name=projects/*/locations/*/aspectTypes/*}¸ -ListAspectTypes0.google.cloud.dataplex.v1.ListAspectTypesRequest1.google.cloud.dataplex.v1.ListAspectTypesResponse"@ÚAparent‚Óä“1//v1/{parent=projects/*/locations/*}/aspectTypes¥ - GetAspectType..google.cloud.dataplex.v1.GetAspectTypeRequest$.google.cloud.dataplex.v1.AspectType">ÚAname‚Óä“1//v1/{name=projects/*/locations/*/aspectTypes/*}ñ -CreateEntryGroup1.google.cloud.dataplex.v1.CreateEntryGroupRequest.google.longrunning.Operation"ŠÊA - -EntryGroupOperationMetadataÚA!parent,entry_group,entry_group_id‚Óä“>"//v1/{parent=projects/*/locations/*}/entryGroups: entry_groupó -UpdateEntryGroup1.google.cloud.dataplex.v1.UpdateEntryGroupRequest.google.longrunning.Operation"ŒÊA - -EntryGroupOperationMetadataÚAentry_group,update_mask‚Óä“J2;/v1/{entry_group.name=projects/*/locations/*/entryGroups/*}: entry_groupÑ -DeleteEntryGroup1.google.cloud.dataplex.v1.DeleteEntryGroupRequest.google.longrunning.Operation"kÊA* -google.protobuf.EmptyOperationMetadataÚAname‚Óä“1*//v1/{name=projects/*/locations/*/entryGroups/*}¸ -ListEntryGroups0.google.cloud.dataplex.v1.ListEntryGroupsRequest1.google.cloud.dataplex.v1.ListEntryGroupsResponse"@ÚAparent‚Óä“1//v1/{parent=projects/*/locations/*}/entryGroups¥ - GetEntryGroup..google.cloud.dataplex.v1.GetEntryGroupRequest$.google.cloud.dataplex.v1.EntryGroup">ÚAname‚Óä“1//v1/{name=projects/*/locations/*/entryGroups/*}¾ - CreateEntry,.google.cloud.dataplex.v1.CreateEntryRequest.google.cloud.dataplex.v1.Entry"`ÚAparent,entry,entry_id‚Óä“B"9/v1/{parent=projects/*/locations/*/entryGroups/*}/entries:entryÁ - UpdateEntry,.google.cloud.dataplex.v1.UpdateEntryRequest.google.cloud.dataplex.v1.Entry"cÚAentry,update_mask‚Óä“I2@/v1/{entry.name=projects/*/locations/*/entryGroups/*/entries/**}:entry§ - DeleteEntry,.google.cloud.dataplex.v1.DeleteEntryRequest.google.cloud.dataplex.v1.Entry"IÚAname‚Óä“<*:/v1/{name=projects/*/locations/*/entryGroups/*/entries/**}¶ - ListEntries,.google.cloud.dataplex.v1.ListEntriesRequest-.google.cloud.dataplex.v1.ListEntriesResponse"JÚAparent‚Óä“;9/v1/{parent=projects/*/locations/*/entryGroups/*}/entries¡ -GetEntry).google.cloud.dataplex.v1.GetEntryRequest.google.cloud.dataplex.v1.Entry"IÚAname‚Óä“<:/v1/{name=projects/*/locations/*/entryGroups/*/entries/**}“ - LookupEntry,.google.cloud.dataplex.v1.LookupEntryRequest.google.cloud.dataplex.v1.Entry"5‚Óä“/-/v1/{name=projects/*/locations/*}:lookupEntry¶ - SearchEntries..google.cloud.dataplex.v1.SearchEntriesRequest/.google.cloud.dataplex.v1.SearchEntriesResponse"DÚA -name,query‚Óä“1"//v1/{name=projects/*/locations/*}:searchEntriesKÊAdataplex.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformB¼ -com.google.cloud.dataplex.v1B CatalogProtoPZ8cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpbªGoogle.Cloud.Dataplex.V1ÊGoogle\\Cloud\\Dataplex\\V1êGoogle::Cloud::Dataplex::V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/Content.php b/owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/Content.php deleted file mode 100644 index 56ead5e6865c..000000000000 Binary files a/owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/Content.php and /dev/null differ diff --git a/owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/DataProfile.php b/owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/DataProfile.php deleted file mode 100644 index 41e495fc657a..000000000000 Binary files a/owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/DataProfile.php and /dev/null differ diff --git a/owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/DataQuality.php b/owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/DataQuality.php deleted file mode 100644 index a0ce2465cea5..000000000000 Binary files a/owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/DataQuality.php and /dev/null differ diff --git a/owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/DataTaxonomy.php b/owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/DataTaxonomy.php deleted file mode 100644 index 13dcfc4d8c8d..000000000000 Binary files a/owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/DataTaxonomy.php and /dev/null differ diff --git a/owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/Datascans.php b/owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/Datascans.php deleted file mode 100644 index e4c189cf6f4b..000000000000 Binary files a/owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/Datascans.php and /dev/null differ diff --git a/owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/Logs.php b/owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/Logs.php deleted file mode 100644 index f8a7f110a7f9..000000000000 Binary files a/owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/Logs.php and /dev/null differ diff --git a/owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/Metadata.php b/owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/Metadata.php deleted file mode 100644 index 16272944219b..000000000000 Binary files a/owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/Metadata.php and /dev/null differ diff --git a/owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/Processing.php b/owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/Processing.php deleted file mode 100644 index 9ea55d31edfc..000000000000 Binary files a/owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/Processing.php and /dev/null differ diff --git a/owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/Resources.php b/owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/Resources.php deleted file mode 100644 index 0531797a0ff8..000000000000 Binary files a/owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/Resources.php and /dev/null differ diff --git a/owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/Security.php b/owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/Security.php deleted file mode 100644 index ca7d63a45e79..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/Security.php +++ /dev/null @@ -1,34 +0,0 @@ -internalAddGeneratedFile( - ' -µ -\'google/cloud/dataplex/v1/security.protogoogle.cloud.dataplex.v1"U -ResourceAccessSpec -readers ( BàA -writers ( BàA -owners ( BàA"& -DataAccessSpec -readers ( BàABi -com.google.cloud.dataplex.v1B SecurityProtoPZ8cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpbbproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/Service.php b/owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/Service.php deleted file mode 100644 index 4a0b1ddd8b32..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/Service.php +++ /dev/null @@ -1,301 +0,0 @@ -internalAddGeneratedFile( - ' -•b -&google/cloud/dataplex/v1/service.protogoogle.cloud.dataplex.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto&google/cloud/dataplex/v1/analyze.proto(google/cloud/dataplex/v1/resources.proto$google/cloud/dataplex/v1/tasks.proto#google/longrunning/operations.protogoogle/protobuf/empty.proto google/protobuf/field_mask.protogoogle/protobuf/timestamp.proto"³ -CreateLakeRequest9 -parent ( B)àAúA# -!locations.googleapis.com/Location -lake_id ( BàA1 -lake ( 2.google.cloud.dataplex.v1.LakeBàA - validate_only (BàA"˜ -UpdateLakeRequest4 - update_mask ( 2.google.protobuf.FieldMaskBàA1 -lake ( 2.google.cloud.dataplex.v1.LakeBàA - validate_only (BàA"G -DeleteLakeRequest2 -name ( B$àAúA -dataplex.googleapis.com/Lake"ª -ListLakesRequest9 -parent ( B)àAúA# -!locations.googleapis.com/Location - page_size (BàA - -page_token ( BàA -filter ( BàA -order_by ( BàA"z -ListLakesResponse- -lakes ( 2.google.cloud.dataplex.v1.Lake -next_page_token (  -unreachable_locations ( " -ListLakeActionsRequest4 -parent ( B$àAúA -dataplex.googleapis.com/Lake - page_size (BàA - -page_token ( BàA"a -ListActionsResponse1 -actions ( 2 .google.cloud.dataplex.v1.Action -next_page_token ( "D -GetLakeRequest2 -name ( B$àAúA -dataplex.googleapis.com/Lake"® -CreateZoneRequest4 -parent ( B$àAúA -dataplex.googleapis.com/Lake -zone_id ( BàA1 -zone ( 2.google.cloud.dataplex.v1.ZoneBàA - validate_only (BàA"˜ -UpdateZoneRequest4 - update_mask ( 2.google.protobuf.FieldMaskBàA1 -zone ( 2.google.cloud.dataplex.v1.ZoneBàA - validate_only (BàA"G -DeleteZoneRequest2 -name ( B$àAúA -dataplex.googleapis.com/Zone"¥ -ListZonesRequest4 -parent ( B$àAúA -dataplex.googleapis.com/Lake - page_size (BàA - -page_token ( BàA -filter ( BàA -order_by ( BàA"[ -ListZonesResponse- -zones ( 2.google.cloud.dataplex.v1.Zone -next_page_token ( " -ListZoneActionsRequest4 -parent ( B$àAúA -dataplex.googleapis.com/Zone - page_size (BàA - -page_token ( BàA"D -GetZoneRequest2 -name ( B$àAúA -dataplex.googleapis.com/Zone"² -CreateAssetRequest4 -parent ( B$àAúA -dataplex.googleapis.com/Zone -asset_id ( BàA3 -asset ( 2.google.cloud.dataplex.v1.AssetBàA - validate_only (BàA"› -UpdateAssetRequest4 - update_mask ( 2.google.protobuf.FieldMaskBàA3 -asset ( 2.google.cloud.dataplex.v1.AssetBàA - validate_only (BàA"I -DeleteAssetRequest3 -name ( B%àAúA -dataplex.googleapis.com/Asset"¦ -ListAssetsRequest4 -parent ( B$àAúA -dataplex.googleapis.com/Zone - page_size (BàA - -page_token ( BàA -filter ( BàA -order_by ( BàA"^ -ListAssetsResponse/ -assets ( 2.google.cloud.dataplex.v1.Asset -next_page_token ( " -ListAssetActionsRequest5 -parent ( B%àAúA -dataplex.googleapis.com/Asset - page_size (BàA - -page_token ( BàA"F -GetAssetRequest3 -name ( B%àAúA -dataplex.googleapis.com/Asset"€ -OperationMetadata4 - create_time ( 2.google.protobuf.TimestampBàA1 -end_time ( 2.google.protobuf.TimestampBàA -target ( BàA -verb ( BàA -status_message ( BàA# -requested_cancellation (BàA - api_version ( BàA"® -CreateTaskRequest4 -parent ( B$àAúA -dataplex.googleapis.com/Lake -task_id ( BàA1 -task ( 2.google.cloud.dataplex.v1.TaskBàA - validate_only (BàA"˜ -UpdateTaskRequest4 - update_mask ( 2.google.protobuf.FieldMaskBàA1 -task ( 2.google.cloud.dataplex.v1.TaskBàA - validate_only (BàA"G -DeleteTaskRequest2 -name ( B$àAúA -dataplex.googleapis.com/Task"¥ -ListTasksRequest4 -parent ( B$àAúA -dataplex.googleapis.com/Lake - page_size (BàA - -page_token ( BàA -filter ( BàA -order_by ( BàA"z -ListTasksResponse- -tasks ( 2.google.cloud.dataplex.v1.Task -next_page_token (  -unreachable_locations ( "D -GetTaskRequest2 -name ( B$àAúA -dataplex.googleapis.com/Task"B - GetJobRequest1 -name ( B#àAúA -dataplex.googleapis.com/Job"² -RunTaskRequest2 -name ( B$àAúA -dataplex.googleapis.com/TaskI -labels ( 24.google.cloud.dataplex.v1.RunTaskRequest.LabelsEntryBàAE -args ( 22.google.cloud.dataplex.v1.RunTaskRequest.ArgsEntryBàA- - LabelsEntry -key (  -value ( :8+ - ArgsEntry -key (  -value ( :8"= -RunTaskResponse* -job ( 2.google.cloud.dataplex.v1.Job"x -ListJobsRequest4 -parent ( B$àAúA -dataplex.googleapis.com/Task - page_size (BàA - -page_token ( BàA"X -ListJobsResponse+ -jobs ( 2.google.cloud.dataplex.v1.Job -next_page_token ( "E -CancelJobRequest1 -name ( B#àAúA -dataplex.googleapis.com/Job"Ê -CreateEnvironmentRequest4 -parent ( B$àAúA -dataplex.googleapis.com/Lake -environment_id ( BàA? - environment ( 2%.google.cloud.dataplex.v1.EnvironmentBàA - validate_only (BàA"­ -UpdateEnvironmentRequest4 - update_mask ( 2.google.protobuf.FieldMaskBàA? - environment ( 2%.google.cloud.dataplex.v1.EnvironmentBàA - validate_only (BàA"U -DeleteEnvironmentRequest9 -name ( B+àAúA% -#dataplex.googleapis.com/Environment"¬ -ListEnvironmentsRequest4 -parent ( B$àAúA -dataplex.googleapis.com/Lake - page_size (BàA - -page_token ( BàA -filter ( BàA -order_by ( BàA"p -ListEnvironmentsResponse; - environments ( 2%.google.cloud.dataplex.v1.Environment -next_page_token ( "R -GetEnvironmentRequest9 -name ( B+àAúA% -#dataplex.googleapis.com/Environment"˜ -ListSessionsRequest; -parent ( B+àAúA% -#dataplex.googleapis.com/Environment - page_size (BàA - -page_token ( BàA -filter ( BàA"d -ListSessionsResponse3 -sessions ( 2!.google.cloud.dataplex.v1.Session -next_page_token ( 2¬2 -DataplexServiceà - -CreateLake+.google.cloud.dataplex.v1.CreateLakeRequest.google.longrunning.Operation"iÊA -LakeOperationMetadataÚAparent,lake,lake_id‚Óä“1")/v1/{parent=projects/*/locations/*}/lakes:lakeÅ - -UpdateLake+.google.cloud.dataplex.v1.UpdateLakeRequest.google.longrunning.Operation"kÊA -LakeOperationMetadataÚAlake,update_mask‚Óä“62./v1/{lake.name=projects/*/locations/*/lakes/*}:lake¿ - -DeleteLake+.google.cloud.dataplex.v1.DeleteLakeRequest.google.longrunning.Operation"eÊA* -google.protobuf.EmptyOperationMetadataÚAname‚Óä“+*)/v1/{name=projects/*/locations/*/lakes/*}  - ListLakes*.google.cloud.dataplex.v1.ListLakesRequest+.google.cloud.dataplex.v1.ListLakesResponse":ÚAparent‚Óä“+)/v1/{parent=projects/*/locations/*}/lakes -GetLake(.google.cloud.dataplex.v1.GetLakeRequest.google.cloud.dataplex.v1.Lake"8ÚAname‚Óä“+)/v1/{name=projects/*/locations/*/lakes/*}¸ -ListLakeActions0.google.cloud.dataplex.v1.ListLakeActionsRequest-.google.cloud.dataplex.v1.ListActionsResponse"DÚAparent‚Óä“53/v1/{parent=projects/*/locations/*/lakes/*}/actionsË - -CreateZone+.google.cloud.dataplex.v1.CreateZoneRequest.google.longrunning.Operation"qÊA -ZoneOperationMetadataÚAparent,zone,zone_id‚Óä“9"1/v1/{parent=projects/*/locations/*/lakes/*}/zones:zoneÍ - -UpdateZone+.google.cloud.dataplex.v1.UpdateZoneRequest.google.longrunning.Operation"sÊA -ZoneOperationMetadataÚAzone,update_mask‚Óä“>26/v1/{zone.name=projects/*/locations/*/lakes/*/zones/*}:zoneÇ - -DeleteZone+.google.cloud.dataplex.v1.DeleteZoneRequest.google.longrunning.Operation"mÊA* -google.protobuf.EmptyOperationMetadataÚAname‚Óä“3*1/v1/{name=projects/*/locations/*/lakes/*/zones/*}¨ - ListZones*.google.cloud.dataplex.v1.ListZonesRequest+.google.cloud.dataplex.v1.ListZonesResponse"BÚAparent‚Óä“31/v1/{parent=projects/*/locations/*/lakes/*}/zones• -GetZone(.google.cloud.dataplex.v1.GetZoneRequest.google.cloud.dataplex.v1.Zone"@ÚAname‚Óä“31/v1/{name=projects/*/locations/*/lakes/*/zones/*}À -ListZoneActions0.google.cloud.dataplex.v1.ListZoneActionsRequest-.google.cloud.dataplex.v1.ListActionsResponse"LÚAparent‚Óä“=;/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/actionsÚ - CreateAsset,.google.cloud.dataplex.v1.CreateAssetRequest.google.longrunning.Operation"~ÊA -AssetOperationMetadataÚAparent,asset,asset_id‚Óä“C":/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/assets:assetÝ - UpdateAsset,.google.cloud.dataplex.v1.UpdateAssetRequest.google.longrunning.Operation"€ÊA -AssetOperationMetadataÚAasset,update_mask‚Óä“I2@/v1/{asset.name=projects/*/locations/*/lakes/*/zones/*/assets/*}:assetÒ - DeleteAsset,.google.cloud.dataplex.v1.DeleteAssetRequest.google.longrunning.Operation"vÊA* -google.protobuf.EmptyOperationMetadataÚAname‚Óä“<*:/v1/{name=projects/*/locations/*/lakes/*/zones/*/assets/*}´ - -ListAssets+.google.cloud.dataplex.v1.ListAssetsRequest,.google.cloud.dataplex.v1.ListAssetsResponse"KÚAparent‚Óä“<:/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/assets¡ -GetAsset).google.cloud.dataplex.v1.GetAssetRequest.google.cloud.dataplex.v1.Asset"IÚAname‚Óä“<:/v1/{name=projects/*/locations/*/lakes/*/zones/*/assets/*}Ë -ListAssetActions1.google.cloud.dataplex.v1.ListAssetActionsRequest-.google.cloud.dataplex.v1.ListActionsResponse"UÚAparent‚Óä“FD/v1/{parent=projects/*/locations/*/lakes/*/zones/*/assets/*}/actionsË - -CreateTask+.google.cloud.dataplex.v1.CreateTaskRequest.google.longrunning.Operation"qÊA -TaskOperationMetadataÚAparent,task,task_id‚Óä“9"1/v1/{parent=projects/*/locations/*/lakes/*}/tasks:taskÍ - -UpdateTask+.google.cloud.dataplex.v1.UpdateTaskRequest.google.longrunning.Operation"sÊA -TaskOperationMetadataÚAtask,update_mask‚Óä“>26/v1/{task.name=projects/*/locations/*/lakes/*/tasks/*}:taskÇ - -DeleteTask+.google.cloud.dataplex.v1.DeleteTaskRequest.google.longrunning.Operation"mÊA* -google.protobuf.EmptyOperationMetadataÚAname‚Óä“3*1/v1/{name=projects/*/locations/*/lakes/*/tasks/*}¨ - ListTasks*.google.cloud.dataplex.v1.ListTasksRequest+.google.cloud.dataplex.v1.ListTasksResponse"BÚAparent‚Óä“31/v1/{parent=projects/*/locations/*/lakes/*}/tasks• -GetTask(.google.cloud.dataplex.v1.GetTaskRequest.google.cloud.dataplex.v1.Task"@ÚAname‚Óä“31/v1/{name=projects/*/locations/*/lakes/*/tasks/*}¬ -ListJobs).google.cloud.dataplex.v1.ListJobsRequest*.google.cloud.dataplex.v1.ListJobsResponse"IÚAparent‚Óä“:8/v1/{parent=projects/*/locations/*/lakes/*/tasks/*}/jobs§ -RunTask(.google.cloud.dataplex.v1.RunTaskRequest).google.cloud.dataplex.v1.RunTaskResponse"GÚAname‚Óä“:"5/v1/{name=projects/*/locations/*/lakes/*/tasks/*}:run:*™ -GetJob\'.google.cloud.dataplex.v1.GetJobRequest.google.cloud.dataplex.v1.Job"GÚAname‚Óä“:8/v1/{name=projects/*/locations/*/lakes/*/tasks/*/jobs/*}¢ - CancelJob*.google.cloud.dataplex.v1.CancelJobRequest.google.protobuf.Empty"QÚAname‚Óä“D"?/v1/{name=projects/*/locations/*/lakes/*/tasks/*/jobs/*}:cancel:*ý -CreateEnvironment2.google.cloud.dataplex.v1.CreateEnvironmentRequest.google.longrunning.Operation"”ÊA - EnvironmentOperationMetadataÚA!parent,environment,environment_id‚Óä“G"8/v1/{parent=projects/*/locations/*/lakes/*}/environments: environmentÿ -UpdateEnvironment2.google.cloud.dataplex.v1.UpdateEnvironmentRequest.google.longrunning.Operation"–ÊA - EnvironmentOperationMetadataÚAenvironment,update_mask‚Óä“S2D/v1/{environment.name=projects/*/locations/*/lakes/*/environments/*}: environmentÜ -DeleteEnvironment2.google.cloud.dataplex.v1.DeleteEnvironmentRequest.google.longrunning.Operation"tÊA* -google.protobuf.EmptyOperationMetadataÚAname‚Óä“:*8/v1/{name=projects/*/locations/*/lakes/*/environments/*}Ä -ListEnvironments1.google.cloud.dataplex.v1.ListEnvironmentsRequest2.google.cloud.dataplex.v1.ListEnvironmentsResponse"IÚAparent‚Óä“:8/v1/{parent=projects/*/locations/*/lakes/*}/environments± -GetEnvironment/.google.cloud.dataplex.v1.GetEnvironmentRequest%.google.cloud.dataplex.v1.Environment"GÚAname‚Óä“:8/v1/{name=projects/*/locations/*/lakes/*/environments/*}à - ListSessions-.google.cloud.dataplex.v1.ListSessionsRequest..google.cloud.dataplex.v1.ListSessionsResponse"TÚAparent‚Óä“EC/v1/{parent=projects/*/locations/*/lakes/*/environments/*}/sessionsKÊAdataplex.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformBh -com.google.cloud.dataplex.v1B ServiceProtoPZ8cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpbbproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/Tasks.php b/owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/Tasks.php deleted file mode 100644 index e1eb3b051c31..000000000000 Binary files a/owl-bot-staging/Dataplex/v1/proto/src/GPBMetadata/Google/Cloud/Dataplex/V1/Tasks.php and /dev/null differ diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action.php deleted file mode 100644 index a7fcaca2fc61..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action.php +++ /dev/null @@ -1,634 +0,0 @@ -google.cloud.dataplex.v1.Action - */ -class Action extends \Google\Protobuf\Internal\Message -{ - /** - * The category of issue associated with the action. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Action.Category category = 1; - */ - protected $category = 0; - /** - * Detailed description of the issue requiring action. - * - * Generated from protobuf field string issue = 2; - */ - protected $issue = ''; - /** - * The time that the issue was detected. - * - * Generated from protobuf field .google.protobuf.Timestamp detect_time = 4; - */ - protected $detect_time = null; - /** - * Output only. The relative resource name of the action, of the form: - * `projects/{project}/locations/{location}/lakes/{lake}/actions/{action}` - * `projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/actions/{action}` - * `projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}/actions/{action}`. - * - * Generated from protobuf field string name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Output only. The relative resource name of the lake, of the form: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * - * Generated from protobuf field string lake = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $lake = ''; - /** - * Output only. The relative resource name of the zone, of the form: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * - * Generated from protobuf field string zone = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $zone = ''; - /** - * Output only. The relative resource name of the asset, of the form: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. - * - * Generated from protobuf field string asset = 8 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $asset = ''; - /** - * The list of data locations associated with this action. Cloud Storage - * locations are represented as URI paths(E.g. - * `gs://bucket/table1/year=2020/month=Jan/`). BigQuery locations refer to - * resource names(E.g. - * `bigquery.googleapis.com/projects/project-id/datasets/dataset-id`). - * - * Generated from protobuf field repeated string data_locations = 9; - */ - private $data_locations; - protected $details; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $category - * The category of issue associated with the action. - * @type string $issue - * Detailed description of the issue requiring action. - * @type \Google\Protobuf\Timestamp $detect_time - * The time that the issue was detected. - * @type string $name - * Output only. The relative resource name of the action, of the form: - * `projects/{project}/locations/{location}/lakes/{lake}/actions/{action}` - * `projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/actions/{action}` - * `projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}/actions/{action}`. - * @type string $lake - * Output only. The relative resource name of the lake, of the form: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * @type string $zone - * Output only. The relative resource name of the zone, of the form: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * @type string $asset - * Output only. The relative resource name of the asset, of the form: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. - * @type array|\Google\Protobuf\Internal\RepeatedField $data_locations - * The list of data locations associated with this action. Cloud Storage - * locations are represented as URI paths(E.g. - * `gs://bucket/table1/year=2020/month=Jan/`). BigQuery locations refer to - * resource names(E.g. - * `bigquery.googleapis.com/projects/project-id/datasets/dataset-id`). - * @type \Google\Cloud\Dataplex\V1\Action\InvalidDataFormat $invalid_data_format - * Details for issues related to invalid or unsupported data formats. - * @type \Google\Cloud\Dataplex\V1\Action\IncompatibleDataSchema $incompatible_data_schema - * Details for issues related to incompatible schemas detected within data. - * @type \Google\Cloud\Dataplex\V1\Action\InvalidDataPartition $invalid_data_partition - * Details for issues related to invalid or unsupported data partition - * structure. - * @type \Google\Cloud\Dataplex\V1\Action\MissingData $missing_data - * Details for issues related to absence of data within managed resources. - * @type \Google\Cloud\Dataplex\V1\Action\MissingResource $missing_resource - * Details for issues related to absence of a managed resource. - * @type \Google\Cloud\Dataplex\V1\Action\UnauthorizedResource $unauthorized_resource - * Details for issues related to lack of permissions to access data - * resources. - * @type \Google\Cloud\Dataplex\V1\Action\FailedSecurityPolicyApply $failed_security_policy_apply - * Details for issues related to applying security policy. - * @type \Google\Cloud\Dataplex\V1\Action\InvalidDataOrganization $invalid_data_organization - * Details for issues related to invalid data arrangement. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The category of issue associated with the action. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Action.Category category = 1; - * @return int - */ - public function getCategory() - { - return $this->category; - } - - /** - * The category of issue associated with the action. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Action.Category category = 1; - * @param int $var - * @return $this - */ - public function setCategory($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\Action\Category::class); - $this->category = $var; - - return $this; - } - - /** - * Detailed description of the issue requiring action. - * - * Generated from protobuf field string issue = 2; - * @return string - */ - public function getIssue() - { - return $this->issue; - } - - /** - * Detailed description of the issue requiring action. - * - * Generated from protobuf field string issue = 2; - * @param string $var - * @return $this - */ - public function setIssue($var) - { - GPBUtil::checkString($var, True); - $this->issue = $var; - - return $this; - } - - /** - * The time that the issue was detected. - * - * Generated from protobuf field .google.protobuf.Timestamp detect_time = 4; - * @return \Google\Protobuf\Timestamp|null - */ - public function getDetectTime() - { - return $this->detect_time; - } - - public function hasDetectTime() - { - return isset($this->detect_time); - } - - public function clearDetectTime() - { - unset($this->detect_time); - } - - /** - * The time that the issue was detected. - * - * Generated from protobuf field .google.protobuf.Timestamp detect_time = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setDetectTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->detect_time = $var; - - return $this; - } - - /** - * Output only. The relative resource name of the action, of the form: - * `projects/{project}/locations/{location}/lakes/{lake}/actions/{action}` - * `projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/actions/{action}` - * `projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}/actions/{action}`. - * - * Generated from protobuf field string name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The relative resource name of the action, of the form: - * `projects/{project}/locations/{location}/lakes/{lake}/actions/{action}` - * `projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/actions/{action}` - * `projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}/actions/{action}`. - * - * Generated from protobuf field string name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. The relative resource name of the lake, of the form: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * - * Generated from protobuf field string lake = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getLake() - { - return $this->lake; - } - - /** - * Output only. The relative resource name of the lake, of the form: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * - * Generated from protobuf field string lake = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setLake($var) - { - GPBUtil::checkString($var, True); - $this->lake = $var; - - return $this; - } - - /** - * Output only. The relative resource name of the zone, of the form: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * - * Generated from protobuf field string zone = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getZone() - { - return $this->zone; - } - - /** - * Output only. The relative resource name of the zone, of the form: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * - * Generated from protobuf field string zone = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setZone($var) - { - GPBUtil::checkString($var, True); - $this->zone = $var; - - return $this; - } - - /** - * Output only. The relative resource name of the asset, of the form: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. - * - * Generated from protobuf field string asset = 8 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getAsset() - { - return $this->asset; - } - - /** - * Output only. The relative resource name of the asset, of the form: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. - * - * Generated from protobuf field string asset = 8 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setAsset($var) - { - GPBUtil::checkString($var, True); - $this->asset = $var; - - return $this; - } - - /** - * The list of data locations associated with this action. Cloud Storage - * locations are represented as URI paths(E.g. - * `gs://bucket/table1/year=2020/month=Jan/`). BigQuery locations refer to - * resource names(E.g. - * `bigquery.googleapis.com/projects/project-id/datasets/dataset-id`). - * - * Generated from protobuf field repeated string data_locations = 9; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDataLocations() - { - return $this->data_locations; - } - - /** - * The list of data locations associated with this action. Cloud Storage - * locations are represented as URI paths(E.g. - * `gs://bucket/table1/year=2020/month=Jan/`). BigQuery locations refer to - * resource names(E.g. - * `bigquery.googleapis.com/projects/project-id/datasets/dataset-id`). - * - * Generated from protobuf field repeated string data_locations = 9; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDataLocations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->data_locations = $arr; - - return $this; - } - - /** - * Details for issues related to invalid or unsupported data formats. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Action.InvalidDataFormat invalid_data_format = 10; - * @return \Google\Cloud\Dataplex\V1\Action\InvalidDataFormat|null - */ - public function getInvalidDataFormat() - { - return $this->readOneof(10); - } - - public function hasInvalidDataFormat() - { - return $this->hasOneof(10); - } - - /** - * Details for issues related to invalid or unsupported data formats. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Action.InvalidDataFormat invalid_data_format = 10; - * @param \Google\Cloud\Dataplex\V1\Action\InvalidDataFormat $var - * @return $this - */ - public function setInvalidDataFormat($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Action\InvalidDataFormat::class); - $this->writeOneof(10, $var); - - return $this; - } - - /** - * Details for issues related to incompatible schemas detected within data. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Action.IncompatibleDataSchema incompatible_data_schema = 11; - * @return \Google\Cloud\Dataplex\V1\Action\IncompatibleDataSchema|null - */ - public function getIncompatibleDataSchema() - { - return $this->readOneof(11); - } - - public function hasIncompatibleDataSchema() - { - return $this->hasOneof(11); - } - - /** - * Details for issues related to incompatible schemas detected within data. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Action.IncompatibleDataSchema incompatible_data_schema = 11; - * @param \Google\Cloud\Dataplex\V1\Action\IncompatibleDataSchema $var - * @return $this - */ - public function setIncompatibleDataSchema($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Action\IncompatibleDataSchema::class); - $this->writeOneof(11, $var); - - return $this; - } - - /** - * Details for issues related to invalid or unsupported data partition - * structure. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Action.InvalidDataPartition invalid_data_partition = 12; - * @return \Google\Cloud\Dataplex\V1\Action\InvalidDataPartition|null - */ - public function getInvalidDataPartition() - { - return $this->readOneof(12); - } - - public function hasInvalidDataPartition() - { - return $this->hasOneof(12); - } - - /** - * Details for issues related to invalid or unsupported data partition - * structure. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Action.InvalidDataPartition invalid_data_partition = 12; - * @param \Google\Cloud\Dataplex\V1\Action\InvalidDataPartition $var - * @return $this - */ - public function setInvalidDataPartition($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Action\InvalidDataPartition::class); - $this->writeOneof(12, $var); - - return $this; - } - - /** - * Details for issues related to absence of data within managed resources. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Action.MissingData missing_data = 13; - * @return \Google\Cloud\Dataplex\V1\Action\MissingData|null - */ - public function getMissingData() - { - return $this->readOneof(13); - } - - public function hasMissingData() - { - return $this->hasOneof(13); - } - - /** - * Details for issues related to absence of data within managed resources. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Action.MissingData missing_data = 13; - * @param \Google\Cloud\Dataplex\V1\Action\MissingData $var - * @return $this - */ - public function setMissingData($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Action\MissingData::class); - $this->writeOneof(13, $var); - - return $this; - } - - /** - * Details for issues related to absence of a managed resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Action.MissingResource missing_resource = 14; - * @return \Google\Cloud\Dataplex\V1\Action\MissingResource|null - */ - public function getMissingResource() - { - return $this->readOneof(14); - } - - public function hasMissingResource() - { - return $this->hasOneof(14); - } - - /** - * Details for issues related to absence of a managed resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Action.MissingResource missing_resource = 14; - * @param \Google\Cloud\Dataplex\V1\Action\MissingResource $var - * @return $this - */ - public function setMissingResource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Action\MissingResource::class); - $this->writeOneof(14, $var); - - return $this; - } - - /** - * Details for issues related to lack of permissions to access data - * resources. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Action.UnauthorizedResource unauthorized_resource = 15; - * @return \Google\Cloud\Dataplex\V1\Action\UnauthorizedResource|null - */ - public function getUnauthorizedResource() - { - return $this->readOneof(15); - } - - public function hasUnauthorizedResource() - { - return $this->hasOneof(15); - } - - /** - * Details for issues related to lack of permissions to access data - * resources. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Action.UnauthorizedResource unauthorized_resource = 15; - * @param \Google\Cloud\Dataplex\V1\Action\UnauthorizedResource $var - * @return $this - */ - public function setUnauthorizedResource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Action\UnauthorizedResource::class); - $this->writeOneof(15, $var); - - return $this; - } - - /** - * Details for issues related to applying security policy. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply failed_security_policy_apply = 21; - * @return \Google\Cloud\Dataplex\V1\Action\FailedSecurityPolicyApply|null - */ - public function getFailedSecurityPolicyApply() - { - return $this->readOneof(21); - } - - public function hasFailedSecurityPolicyApply() - { - return $this->hasOneof(21); - } - - /** - * Details for issues related to applying security policy. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply failed_security_policy_apply = 21; - * @param \Google\Cloud\Dataplex\V1\Action\FailedSecurityPolicyApply $var - * @return $this - */ - public function setFailedSecurityPolicyApply($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Action\FailedSecurityPolicyApply::class); - $this->writeOneof(21, $var); - - return $this; - } - - /** - * Details for issues related to invalid data arrangement. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Action.InvalidDataOrganization invalid_data_organization = 22; - * @return \Google\Cloud\Dataplex\V1\Action\InvalidDataOrganization|null - */ - public function getInvalidDataOrganization() - { - return $this->readOneof(22); - } - - public function hasInvalidDataOrganization() - { - return $this->hasOneof(22); - } - - /** - * Details for issues related to invalid data arrangement. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Action.InvalidDataOrganization invalid_data_organization = 22; - * @param \Google\Cloud\Dataplex\V1\Action\InvalidDataOrganization $var - * @return $this - */ - public function setInvalidDataOrganization($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Action\InvalidDataOrganization::class); - $this->writeOneof(22, $var); - - return $this; - } - - /** - * @return string - */ - public function getDetails() - { - return $this->whichOneof("details"); - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/Category.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/Category.php deleted file mode 100644 index ce9240e40a4a..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/Category.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.dataplex.v1.Action.Category - */ -class Category -{ - /** - * Unspecified category. - * - * Generated from protobuf enum CATEGORY_UNSPECIFIED = 0; - */ - const CATEGORY_UNSPECIFIED = 0; - /** - * Resource management related issues. - * - * Generated from protobuf enum RESOURCE_MANAGEMENT = 1; - */ - const RESOURCE_MANAGEMENT = 1; - /** - * Security policy related issues. - * - * Generated from protobuf enum SECURITY_POLICY = 2; - */ - const SECURITY_POLICY = 2; - /** - * Data and discovery related issues. - * - * Generated from protobuf enum DATA_DISCOVERY = 3; - */ - const DATA_DISCOVERY = 3; - - private static $valueToName = [ - self::CATEGORY_UNSPECIFIED => 'CATEGORY_UNSPECIFIED', - self::RESOURCE_MANAGEMENT => 'RESOURCE_MANAGEMENT', - self::SECURITY_POLICY => 'SECURITY_POLICY', - self::DATA_DISCOVERY => 'DATA_DISCOVERY', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Category::class, \Google\Cloud\Dataplex\V1\Action_Category::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/FailedSecurityPolicyApply.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/FailedSecurityPolicyApply.php deleted file mode 100644 index 4b04784bc750..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/FailedSecurityPolicyApply.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.dataplex.v1.Action.FailedSecurityPolicyApply - */ -class FailedSecurityPolicyApply extends \Google\Protobuf\Internal\Message -{ - /** - * Resource name of one of the assets with failing security policy - * application. Populated for a lake or zone resource only. - * - * Generated from protobuf field string asset = 1; - */ - protected $asset = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $asset - * Resource name of one of the assets with failing security policy - * application. Populated for a lake or zone resource only. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Resource name of one of the assets with failing security policy - * application. Populated for a lake or zone resource only. - * - * Generated from protobuf field string asset = 1; - * @return string - */ - public function getAsset() - { - return $this->asset; - } - - /** - * Resource name of one of the assets with failing security policy - * application. Populated for a lake or zone resource only. - * - * Generated from protobuf field string asset = 1; - * @param string $var - * @return $this - */ - public function setAsset($var) - { - GPBUtil::checkString($var, True); - $this->asset = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(FailedSecurityPolicyApply::class, \Google\Cloud\Dataplex\V1\Action_FailedSecurityPolicyApply::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/IncompatibleDataSchema.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/IncompatibleDataSchema.php deleted file mode 100644 index cd0596053a2c..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/IncompatibleDataSchema.php +++ /dev/null @@ -1,218 +0,0 @@ -google.cloud.dataplex.v1.Action.IncompatibleDataSchema - */ -class IncompatibleDataSchema extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the table containing invalid data. - * - * Generated from protobuf field string table = 1; - */ - protected $table = ''; - /** - * The existing and expected schema of the table. The schema is provided as - * a JSON formatted structure listing columns and data types. - * - * Generated from protobuf field string existing_schema = 2; - */ - protected $existing_schema = ''; - /** - * The new and incompatible schema within the table. The schema is provided - * as a JSON formatted structured listing columns and data types. - * - * Generated from protobuf field string new_schema = 3; - */ - protected $new_schema = ''; - /** - * The list of data locations sampled and used for format/schema - * inference. - * - * Generated from protobuf field repeated string sampled_data_locations = 4; - */ - private $sampled_data_locations; - /** - * Whether the action relates to a schema that is incompatible or modified. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Action.IncompatibleDataSchema.SchemaChange schema_change = 5; - */ - protected $schema_change = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $table - * The name of the table containing invalid data. - * @type string $existing_schema - * The existing and expected schema of the table. The schema is provided as - * a JSON formatted structure listing columns and data types. - * @type string $new_schema - * The new and incompatible schema within the table. The schema is provided - * as a JSON formatted structured listing columns and data types. - * @type array|\Google\Protobuf\Internal\RepeatedField $sampled_data_locations - * The list of data locations sampled and used for format/schema - * inference. - * @type int $schema_change - * Whether the action relates to a schema that is incompatible or modified. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The name of the table containing invalid data. - * - * Generated from protobuf field string table = 1; - * @return string - */ - public function getTable() - { - return $this->table; - } - - /** - * The name of the table containing invalid data. - * - * Generated from protobuf field string table = 1; - * @param string $var - * @return $this - */ - public function setTable($var) - { - GPBUtil::checkString($var, True); - $this->table = $var; - - return $this; - } - - /** - * The existing and expected schema of the table. The schema is provided as - * a JSON formatted structure listing columns and data types. - * - * Generated from protobuf field string existing_schema = 2; - * @return string - */ - public function getExistingSchema() - { - return $this->existing_schema; - } - - /** - * The existing and expected schema of the table. The schema is provided as - * a JSON formatted structure listing columns and data types. - * - * Generated from protobuf field string existing_schema = 2; - * @param string $var - * @return $this - */ - public function setExistingSchema($var) - { - GPBUtil::checkString($var, True); - $this->existing_schema = $var; - - return $this; - } - - /** - * The new and incompatible schema within the table. The schema is provided - * as a JSON formatted structured listing columns and data types. - * - * Generated from protobuf field string new_schema = 3; - * @return string - */ - public function getNewSchema() - { - return $this->new_schema; - } - - /** - * The new and incompatible schema within the table. The schema is provided - * as a JSON formatted structured listing columns and data types. - * - * Generated from protobuf field string new_schema = 3; - * @param string $var - * @return $this - */ - public function setNewSchema($var) - { - GPBUtil::checkString($var, True); - $this->new_schema = $var; - - return $this; - } - - /** - * The list of data locations sampled and used for format/schema - * inference. - * - * Generated from protobuf field repeated string sampled_data_locations = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSampledDataLocations() - { - return $this->sampled_data_locations; - } - - /** - * The list of data locations sampled and used for format/schema - * inference. - * - * Generated from protobuf field repeated string sampled_data_locations = 4; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSampledDataLocations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->sampled_data_locations = $arr; - - return $this; - } - - /** - * Whether the action relates to a schema that is incompatible or modified. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Action.IncompatibleDataSchema.SchemaChange schema_change = 5; - * @return int - */ - public function getSchemaChange() - { - return $this->schema_change; - } - - /** - * Whether the action relates to a schema that is incompatible or modified. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Action.IncompatibleDataSchema.SchemaChange schema_change = 5; - * @param int $var - * @return $this - */ - public function setSchemaChange($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\Action\IncompatibleDataSchema\SchemaChange::class); - $this->schema_change = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(IncompatibleDataSchema::class, \Google\Cloud\Dataplex\V1\Action_IncompatibleDataSchema::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/IncompatibleDataSchema/SchemaChange.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/IncompatibleDataSchema/SchemaChange.php deleted file mode 100644 index e9b83fdb588c..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/IncompatibleDataSchema/SchemaChange.php +++ /dev/null @@ -1,65 +0,0 @@ -google.cloud.dataplex.v1.Action.IncompatibleDataSchema.SchemaChange - */ -class SchemaChange -{ - /** - * Schema change unspecified. - * - * Generated from protobuf enum SCHEMA_CHANGE_UNSPECIFIED = 0; - */ - const SCHEMA_CHANGE_UNSPECIFIED = 0; - /** - * Newly discovered schema is incompatible with existing schema. - * - * Generated from protobuf enum INCOMPATIBLE = 1; - */ - const INCOMPATIBLE = 1; - /** - * Newly discovered schema has changed from existing schema for data in a - * curated zone. - * - * Generated from protobuf enum MODIFIED = 2; - */ - const MODIFIED = 2; - - private static $valueToName = [ - self::SCHEMA_CHANGE_UNSPECIFIED => 'SCHEMA_CHANGE_UNSPECIFIED', - self::INCOMPATIBLE => 'INCOMPATIBLE', - self::MODIFIED => 'MODIFIED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SchemaChange::class, \Google\Cloud\Dataplex\V1\Action_IncompatibleDataSchema_SchemaChange::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/InvalidDataFormat.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/InvalidDataFormat.php deleted file mode 100644 index f1c8b0a2da3c..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/InvalidDataFormat.php +++ /dev/null @@ -1,142 +0,0 @@ -google.cloud.dataplex.v1.Action.InvalidDataFormat - */ -class InvalidDataFormat extends \Google\Protobuf\Internal\Message -{ - /** - * The list of data locations sampled and used for format/schema - * inference. - * - * Generated from protobuf field repeated string sampled_data_locations = 1; - */ - private $sampled_data_locations; - /** - * The expected data format of the entity. - * - * Generated from protobuf field string expected_format = 2; - */ - protected $expected_format = ''; - /** - * The new unexpected data format within the entity. - * - * Generated from protobuf field string new_format = 3; - */ - protected $new_format = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $sampled_data_locations - * The list of data locations sampled and used for format/schema - * inference. - * @type string $expected_format - * The expected data format of the entity. - * @type string $new_format - * The new unexpected data format within the entity. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The list of data locations sampled and used for format/schema - * inference. - * - * Generated from protobuf field repeated string sampled_data_locations = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSampledDataLocations() - { - return $this->sampled_data_locations; - } - - /** - * The list of data locations sampled and used for format/schema - * inference. - * - * Generated from protobuf field repeated string sampled_data_locations = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSampledDataLocations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->sampled_data_locations = $arr; - - return $this; - } - - /** - * The expected data format of the entity. - * - * Generated from protobuf field string expected_format = 2; - * @return string - */ - public function getExpectedFormat() - { - return $this->expected_format; - } - - /** - * The expected data format of the entity. - * - * Generated from protobuf field string expected_format = 2; - * @param string $var - * @return $this - */ - public function setExpectedFormat($var) - { - GPBUtil::checkString($var, True); - $this->expected_format = $var; - - return $this; - } - - /** - * The new unexpected data format within the entity. - * - * Generated from protobuf field string new_format = 3; - * @return string - */ - public function getNewFormat() - { - return $this->new_format; - } - - /** - * The new unexpected data format within the entity. - * - * Generated from protobuf field string new_format = 3; - * @param string $var - * @return $this - */ - public function setNewFormat($var) - { - GPBUtil::checkString($var, True); - $this->new_format = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(InvalidDataFormat::class, \Google\Cloud\Dataplex\V1\Action_InvalidDataFormat::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/InvalidDataOrganization.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/InvalidDataOrganization.php deleted file mode 100644 index bea138d90c89..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/InvalidDataOrganization.php +++ /dev/null @@ -1,36 +0,0 @@ -google.cloud.dataplex.v1.Action.InvalidDataOrganization - */ -class InvalidDataOrganization extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Resources::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(InvalidDataOrganization::class, \Google\Cloud\Dataplex\V1\Action_InvalidDataOrganization::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/InvalidDataPartition.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/InvalidDataPartition.php deleted file mode 100644 index 754a46df3975..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/InvalidDataPartition.php +++ /dev/null @@ -1,70 +0,0 @@ -google.cloud.dataplex.v1.Action.InvalidDataPartition - */ -class InvalidDataPartition extends \Google\Protobuf\Internal\Message -{ - /** - * The issue type of InvalidDataPartition. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Action.InvalidDataPartition.PartitionStructure expected_structure = 1; - */ - protected $expected_structure = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $expected_structure - * The issue type of InvalidDataPartition. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The issue type of InvalidDataPartition. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Action.InvalidDataPartition.PartitionStructure expected_structure = 1; - * @return int - */ - public function getExpectedStructure() - { - return $this->expected_structure; - } - - /** - * The issue type of InvalidDataPartition. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Action.InvalidDataPartition.PartitionStructure expected_structure = 1; - * @param int $var - * @return $this - */ - public function setExpectedStructure($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\Action\InvalidDataPartition\PartitionStructure::class); - $this->expected_structure = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(InvalidDataPartition::class, \Google\Cloud\Dataplex\V1\Action_InvalidDataPartition::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/InvalidDataPartition/PartitionStructure.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/InvalidDataPartition/PartitionStructure.php deleted file mode 100644 index 89f807e2f256..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/InvalidDataPartition/PartitionStructure.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.dataplex.v1.Action.InvalidDataPartition.PartitionStructure - */ -class PartitionStructure -{ - /** - * PartitionStructure unspecified. - * - * Generated from protobuf enum PARTITION_STRUCTURE_UNSPECIFIED = 0; - */ - const PARTITION_STRUCTURE_UNSPECIFIED = 0; - /** - * Consistent hive-style partition definition (both raw and curated zone). - * - * Generated from protobuf enum CONSISTENT_KEYS = 1; - */ - const CONSISTENT_KEYS = 1; - /** - * Hive style partition definition (curated zone only). - * - * Generated from protobuf enum HIVE_STYLE_KEYS = 2; - */ - const HIVE_STYLE_KEYS = 2; - - private static $valueToName = [ - self::PARTITION_STRUCTURE_UNSPECIFIED => 'PARTITION_STRUCTURE_UNSPECIFIED', - self::CONSISTENT_KEYS => 'CONSISTENT_KEYS', - self::HIVE_STYLE_KEYS => 'HIVE_STYLE_KEYS', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(PartitionStructure::class, \Google\Cloud\Dataplex\V1\Action_InvalidDataPartition_PartitionStructure::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/MissingData.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/MissingData.php deleted file mode 100644 index aa342f1f091c..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/MissingData.php +++ /dev/null @@ -1,36 +0,0 @@ -google.cloud.dataplex.v1.Action.MissingData - */ -class MissingData extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Resources::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(MissingData::class, \Google\Cloud\Dataplex\V1\Action_MissingData::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/MissingResource.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/MissingResource.php deleted file mode 100644 index a22aefa1573a..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/MissingResource.php +++ /dev/null @@ -1,36 +0,0 @@ -google.cloud.dataplex.v1.Action.MissingResource - */ -class MissingResource extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Resources::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(MissingResource::class, \Google\Cloud\Dataplex\V1\Action_MissingResource::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/UnauthorizedResource.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/UnauthorizedResource.php deleted file mode 100644 index ed6bd9eeb793..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Action/UnauthorizedResource.php +++ /dev/null @@ -1,38 +0,0 @@ -google.cloud.dataplex.v1.Action.UnauthorizedResource - */ -class UnauthorizedResource extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Resources::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(UnauthorizedResource::class, \Google\Cloud\Dataplex\V1\Action_UnauthorizedResource::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Aspect.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Aspect.php deleted file mode 100644 index f4bf896cbff4..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Aspect.php +++ /dev/null @@ -1,278 +0,0 @@ -google.cloud.dataplex.v1.Aspect - */ -class Aspect extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The resource name of the type used to create this Aspect. - * - * Generated from protobuf field string aspect_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $aspect_type = ''; - /** - * Output only. The path in the entry under which the aspect is attached. - * - * Generated from protobuf field string path = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $path = ''; - /** - * Output only. The time when the Aspect was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time when the Aspect was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Required. The content of the aspect, according to its aspect type schema. - * This will replace `content`. - * The maximum size of the field is 120KB (encoded as UTF-8). - * - * Generated from protobuf field .google.protobuf.Struct data = 8 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $data = null; - /** - * Generated from protobuf field .google.cloud.dataplex.v1.AspectSource aspect_source = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $aspect_source = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $aspect_type - * Output only. The resource name of the type used to create this Aspect. - * @type string $path - * Output only. The path in the entry under which the aspect is attached. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time when the Aspect was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time when the Aspect was last updated. - * @type \Google\Protobuf\Struct $data - * Required. The content of the aspect, according to its aspect type schema. - * This will replace `content`. - * The maximum size of the field is 120KB (encoded as UTF-8). - * @type \Google\Cloud\Dataplex\V1\AspectSource $aspect_source - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Catalog::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The resource name of the type used to create this Aspect. - * - * Generated from protobuf field string aspect_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getAspectType() - { - return $this->aspect_type; - } - - /** - * Output only. The resource name of the type used to create this Aspect. - * - * Generated from protobuf field string aspect_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setAspectType($var) - { - GPBUtil::checkString($var, True); - $this->aspect_type = $var; - - return $this; - } - - /** - * Output only. The path in the entry under which the aspect is attached. - * - * Generated from protobuf field string path = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getPath() - { - return $this->path; - } - - /** - * Output only. The path in the entry under which the aspect is attached. - * - * Generated from protobuf field string path = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setPath($var) - { - GPBUtil::checkString($var, True); - $this->path = $var; - - return $this; - } - - /** - * Output only. The time when the Aspect was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time when the Aspect was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The time when the Aspect was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The time when the Aspect was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Required. The content of the aspect, according to its aspect type schema. - * This will replace `content`. - * The maximum size of the field is 120KB (encoded as UTF-8). - * - * Generated from protobuf field .google.protobuf.Struct data = 8 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Struct|null - */ - public function getData() - { - return $this->data; - } - - public function hasData() - { - return isset($this->data); - } - - public function clearData() - { - unset($this->data); - } - - /** - * Required. The content of the aspect, according to its aspect type schema. - * This will replace `content`. - * The maximum size of the field is 120KB (encoded as UTF-8). - * - * Generated from protobuf field .google.protobuf.Struct data = 8 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\Struct $var - * @return $this - */ - public function setData($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); - $this->data = $var; - - return $this; - } - - /** - * Generated from protobuf field .google.cloud.dataplex.v1.AspectSource aspect_source = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataplex\V1\AspectSource|null - */ - public function getAspectSource() - { - return $this->aspect_source; - } - - public function hasAspectSource() - { - return isset($this->aspect_source); - } - - public function clearAspectSource() - { - unset($this->aspect_source); - } - - /** - * Generated from protobuf field .google.cloud.dataplex.v1.AspectSource aspect_source = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataplex\V1\AspectSource $var - * @return $this - */ - public function setAspectSource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\AspectSource::class); - $this->aspect_source = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/AspectSource.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/AspectSource.php deleted file mode 100644 index 65fc88f959c5..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/AspectSource.php +++ /dev/null @@ -1,122 +0,0 @@ -google.cloud.dataplex.v1.AspectSource - */ -class AspectSource extends \Google\Protobuf\Internal\Message -{ - /** - * The create time of the aspect in the source system. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 10; - */ - protected $create_time = null; - /** - * The update time of the aspect in the source system. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 11; - */ - protected $update_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $create_time - * The create time of the aspect in the source system. - * @type \Google\Protobuf\Timestamp $update_time - * The update time of the aspect in the source system. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Catalog::initOnce(); - parent::__construct($data); - } - - /** - * The create time of the aspect in the source system. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 10; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * The create time of the aspect in the source system. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 10; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * The update time of the aspect in the source system. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 11; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * The update time of the aspect in the source system. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 11; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/AspectType.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/AspectType.php deleted file mode 100644 index 40dd2a9326b1..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/AspectType.php +++ /dev/null @@ -1,472 +0,0 @@ -google.cloud.dataplex.v1.AspectType - */ -class AspectType extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The relative resource name of the AspectType, of the form: - * projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Output only. System generated globally unique ID for the AspectType. This - * ID will be different if the AspectType is deleted and re-created with the - * same name. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - /** - * Output only. The time when the AspectType was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time when the AspectType was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Optional. Description of the AspectType. - * - * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Optional. User friendly display name. - * - * Generated from protobuf field string display_name = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $display_name = ''; - /** - * Optional. User-defined labels for the AspectType. - * - * Generated from protobuf field map labels = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * This checksum is computed by the server based on the value of other - * fields, and may be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * - * Generated from protobuf field string etag = 8; - */ - protected $etag = ''; - /** - * Immutable. Authorization defined for this type. - * - * Generated from protobuf field .google.cloud.dataplex.v1.AspectType.Authorization authorization = 52 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $authorization = null; - /** - * Required. MetadataTemplate of the aspect. - * - * Generated from protobuf field .google.cloud.dataplex.v1.AspectType.MetadataTemplate metadata_template = 53 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $metadata_template = null; - /** - * Output only. Denotes the transfer status of the Aspect Type. It is - * unspecified for Aspect Types created from Dataplex API. - * - * Generated from protobuf field .google.cloud.dataplex.v1.TransferStatus transfer_status = 202 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $transfer_status = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The relative resource name of the AspectType, of the form: - * projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}. - * @type string $uid - * Output only. System generated globally unique ID for the AspectType. This - * ID will be different if the AspectType is deleted and re-created with the - * same name. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time when the AspectType was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time when the AspectType was last updated. - * @type string $description - * Optional. Description of the AspectType. - * @type string $display_name - * Optional. User friendly display name. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. User-defined labels for the AspectType. - * @type string $etag - * This checksum is computed by the server based on the value of other - * fields, and may be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * @type \Google\Cloud\Dataplex\V1\AspectType\Authorization $authorization - * Immutable. Authorization defined for this type. - * @type \Google\Cloud\Dataplex\V1\AspectType\MetadataTemplate $metadata_template - * Required. MetadataTemplate of the aspect. - * @type int $transfer_status - * Output only. Denotes the transfer status of the Aspect Type. It is - * unspecified for Aspect Types created from Dataplex API. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Catalog::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The relative resource name of the AspectType, of the form: - * projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The relative resource name of the AspectType, of the form: - * projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. System generated globally unique ID for the AspectType. This - * ID will be different if the AspectType is deleted and re-created with the - * same name. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. System generated globally unique ID for the AspectType. This - * ID will be different if the AspectType is deleted and re-created with the - * same name. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - - /** - * Output only. The time when the AspectType was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time when the AspectType was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The time when the AspectType was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The time when the AspectType was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Optional. Description of the AspectType. - * - * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. Description of the AspectType. - * - * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Optional. User friendly display name. - * - * Generated from protobuf field string display_name = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Optional. User friendly display name. - * - * Generated from protobuf field string display_name = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Optional. User-defined labels for the AspectType. - * - * Generated from protobuf field map labels = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. User-defined labels for the AspectType. - * - * Generated from protobuf field map labels = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * This checksum is computed by the server based on the value of other - * fields, and may be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * - * Generated from protobuf field string etag = 8; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * This checksum is computed by the server based on the value of other - * fields, and may be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * - * Generated from protobuf field string etag = 8; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - - /** - * Immutable. Authorization defined for this type. - * - * Generated from protobuf field .google.cloud.dataplex.v1.AspectType.Authorization authorization = 52 [(.google.api.field_behavior) = IMMUTABLE]; - * @return \Google\Cloud\Dataplex\V1\AspectType\Authorization|null - */ - public function getAuthorization() - { - return $this->authorization; - } - - public function hasAuthorization() - { - return isset($this->authorization); - } - - public function clearAuthorization() - { - unset($this->authorization); - } - - /** - * Immutable. Authorization defined for this type. - * - * Generated from protobuf field .google.cloud.dataplex.v1.AspectType.Authorization authorization = 52 [(.google.api.field_behavior) = IMMUTABLE]; - * @param \Google\Cloud\Dataplex\V1\AspectType\Authorization $var - * @return $this - */ - public function setAuthorization($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\AspectType\Authorization::class); - $this->authorization = $var; - - return $this; - } - - /** - * Required. MetadataTemplate of the aspect. - * - * Generated from protobuf field .google.cloud.dataplex.v1.AspectType.MetadataTemplate metadata_template = 53 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataplex\V1\AspectType\MetadataTemplate|null - */ - public function getMetadataTemplate() - { - return $this->metadata_template; - } - - public function hasMetadataTemplate() - { - return isset($this->metadata_template); - } - - public function clearMetadataTemplate() - { - unset($this->metadata_template); - } - - /** - * Required. MetadataTemplate of the aspect. - * - * Generated from protobuf field .google.cloud.dataplex.v1.AspectType.MetadataTemplate metadata_template = 53 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataplex\V1\AspectType\MetadataTemplate $var - * @return $this - */ - public function setMetadataTemplate($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\AspectType\MetadataTemplate::class); - $this->metadata_template = $var; - - return $this; - } - - /** - * Output only. Denotes the transfer status of the Aspect Type. It is - * unspecified for Aspect Types created from Dataplex API. - * - * Generated from protobuf field .google.cloud.dataplex.v1.TransferStatus transfer_status = 202 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getTransferStatus() - { - return $this->transfer_status; - } - - /** - * Output only. Denotes the transfer status of the Aspect Type. It is - * unspecified for Aspect Types created from Dataplex API. - * - * Generated from protobuf field .google.cloud.dataplex.v1.TransferStatus transfer_status = 202 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setTransferStatus($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\TransferStatus::class); - $this->transfer_status = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/AspectType/Authorization.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/AspectType/Authorization.php deleted file mode 100644 index 5fc5f031e694..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/AspectType/Authorization.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.dataplex.v1.AspectType.Authorization - */ -class Authorization extends \Google\Protobuf\Internal\Message -{ - /** - * Immutable. The IAM permission grantable on the Entry Group to allow - * access to instantiate Aspects of Dataplex owned Aspect Types, only - * settable for Dataplex owned Types. - * - * Generated from protobuf field string alternate_use_permission = 1 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $alternate_use_permission = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $alternate_use_permission - * Immutable. The IAM permission grantable on the Entry Group to allow - * access to instantiate Aspects of Dataplex owned Aspect Types, only - * settable for Dataplex owned Types. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Catalog::initOnce(); - parent::__construct($data); - } - - /** - * Immutable. The IAM permission grantable on the Entry Group to allow - * access to instantiate Aspects of Dataplex owned Aspect Types, only - * settable for Dataplex owned Types. - * - * Generated from protobuf field string alternate_use_permission = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getAlternateUsePermission() - { - return $this->alternate_use_permission; - } - - /** - * Immutable. The IAM permission grantable on the Entry Group to allow - * access to instantiate Aspects of Dataplex owned Aspect Types, only - * settable for Dataplex owned Types. - * - * Generated from protobuf field string alternate_use_permission = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setAlternateUsePermission($var) - { - GPBUtil::checkString($var, True); - $this->alternate_use_permission = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Authorization::class, \Google\Cloud\Dataplex\V1\AspectType_Authorization::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/AspectType/MetadataTemplate.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/AspectType/MetadataTemplate.php deleted file mode 100644 index ccb116173021..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/AspectType/MetadataTemplate.php +++ /dev/null @@ -1,546 +0,0 @@ -google.cloud.dataplex.v1.AspectType.MetadataTemplate - */ -class MetadataTemplate extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Index is used to encode Template messages. The value of index - * can range between 1 and 2,147,483,647. Index must be unique within all - * fields in a Template. (Nested Templates can reuse indexes). Once a - * Template is defined, the index cannot be changed, because it identifies - * the field in the actual storage format. Index is a mandatory field, but - * it is optional for top level fields, and map/array "values" definitions. - * - * Generated from protobuf field int32 index = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $index = 0; - /** - * Required. The name of the field. - * - * Generated from protobuf field string name = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Required. The datatype of this field. The following values are supported: - * Primitive types (string, integer, boolean, double, datetime); datetime - * must be of the format RFC3339 UTC "Zulu" (Examples: - * "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z"). Complex - * types (enum, array, map, record). - * - * Generated from protobuf field string type = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $type = ''; - /** - * Optional. Field definition, needs to be specified if the type is record. - * Defines the nested fields. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.AspectType.MetadataTemplate record_fields = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $record_fields; - /** - * Optional. The list of values for an enum type. Needs to be defined if the - * type is enum. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.AspectType.MetadataTemplate.EnumValue enum_values = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $enum_values; - /** - * Optional. map_items needs to be set if the type is map. map_items can - * refer to a primitive field or a complex (record only) field. To specify a - * primitive field, just name and type needs to be set in the nested - * MetadataTemplate. The recommended value for the name field is item, as - * this is not used in the actual payload. - * - * Generated from protobuf field .google.cloud.dataplex.v1.AspectType.MetadataTemplate map_items = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $map_items = null; - /** - * Optional. array_items needs to be set if the type is array. array_items - * can refer to a primitive field or a complex (record only) field. To - * specify a primitive field, just name and type needs to be set in the - * nested MetadataTemplate. The recommended value for the name field is - * item, as this is not used in the actual payload. - * - * Generated from protobuf field .google.cloud.dataplex.v1.AspectType.MetadataTemplate array_items = 11 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $array_items = null; - /** - * Optional. Id can be used if this definition of the field needs to be - * reused later. Id needs to be unique across the entire template. Id can - * only be specified if the field type is record. - * - * Generated from protobuf field string type_id = 12 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $type_id = ''; - /** - * Optional. A reference to another field definition (instead of an inline - * definition). The value must be equal to the value of an id field defined - * elsewhere in the MetadataTemplate. Only fields with type as record can - * refer to other fields. - * - * Generated from protobuf field string type_ref = 13 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $type_ref = ''; - /** - * Optional. Specifies the constraints on this field. - * - * Generated from protobuf field .google.cloud.dataplex.v1.AspectType.MetadataTemplate.Constraints constraints = 50 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $constraints = null; - /** - * Optional. Specifies annotations on this field. - * - * Generated from protobuf field .google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations annotations = 51 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $annotations = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $index - * Optional. Index is used to encode Template messages. The value of index - * can range between 1 and 2,147,483,647. Index must be unique within all - * fields in a Template. (Nested Templates can reuse indexes). Once a - * Template is defined, the index cannot be changed, because it identifies - * the field in the actual storage format. Index is a mandatory field, but - * it is optional for top level fields, and map/array "values" definitions. - * @type string $name - * Required. The name of the field. - * @type string $type - * Required. The datatype of this field. The following values are supported: - * Primitive types (string, integer, boolean, double, datetime); datetime - * must be of the format RFC3339 UTC "Zulu" (Examples: - * "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z"). Complex - * types (enum, array, map, record). - * @type array<\Google\Cloud\Dataplex\V1\AspectType\MetadataTemplate>|\Google\Protobuf\Internal\RepeatedField $record_fields - * Optional. Field definition, needs to be specified if the type is record. - * Defines the nested fields. - * @type array<\Google\Cloud\Dataplex\V1\AspectType\MetadataTemplate\EnumValue>|\Google\Protobuf\Internal\RepeatedField $enum_values - * Optional. The list of values for an enum type. Needs to be defined if the - * type is enum. - * @type \Google\Cloud\Dataplex\V1\AspectType\MetadataTemplate $map_items - * Optional. map_items needs to be set if the type is map. map_items can - * refer to a primitive field or a complex (record only) field. To specify a - * primitive field, just name and type needs to be set in the nested - * MetadataTemplate. The recommended value for the name field is item, as - * this is not used in the actual payload. - * @type \Google\Cloud\Dataplex\V1\AspectType\MetadataTemplate $array_items - * Optional. array_items needs to be set if the type is array. array_items - * can refer to a primitive field or a complex (record only) field. To - * specify a primitive field, just name and type needs to be set in the - * nested MetadataTemplate. The recommended value for the name field is - * item, as this is not used in the actual payload. - * @type string $type_id - * Optional. Id can be used if this definition of the field needs to be - * reused later. Id needs to be unique across the entire template. Id can - * only be specified if the field type is record. - * @type string $type_ref - * Optional. A reference to another field definition (instead of an inline - * definition). The value must be equal to the value of an id field defined - * elsewhere in the MetadataTemplate. Only fields with type as record can - * refer to other fields. - * @type \Google\Cloud\Dataplex\V1\AspectType\MetadataTemplate\Constraints $constraints - * Optional. Specifies the constraints on this field. - * @type \Google\Cloud\Dataplex\V1\AspectType\MetadataTemplate\Annotations $annotations - * Optional. Specifies annotations on this field. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Catalog::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Index is used to encode Template messages. The value of index - * can range between 1 and 2,147,483,647. Index must be unique within all - * fields in a Template. (Nested Templates can reuse indexes). Once a - * Template is defined, the index cannot be changed, because it identifies - * the field in the actual storage format. Index is a mandatory field, but - * it is optional for top level fields, and map/array "values" definitions. - * - * Generated from protobuf field int32 index = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getIndex() - { - return $this->index; - } - - /** - * Optional. Index is used to encode Template messages. The value of index - * can range between 1 and 2,147,483,647. Index must be unique within all - * fields in a Template. (Nested Templates can reuse indexes). Once a - * Template is defined, the index cannot be changed, because it identifies - * the field in the actual storage format. Index is a mandatory field, but - * it is optional for top level fields, and map/array "values" definitions. - * - * Generated from protobuf field int32 index = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setIndex($var) - { - GPBUtil::checkInt32($var); - $this->index = $var; - - return $this; - } - - /** - * Required. The name of the field. - * - * Generated from protobuf field string name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the field. - * - * Generated from protobuf field string name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. The datatype of this field. The following values are supported: - * Primitive types (string, integer, boolean, double, datetime); datetime - * must be of the format RFC3339 UTC "Zulu" (Examples: - * "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z"). Complex - * types (enum, array, map, record). - * - * Generated from protobuf field string type = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * Required. The datatype of this field. The following values are supported: - * Primitive types (string, integer, boolean, double, datetime); datetime - * must be of the format RFC3339 UTC "Zulu" (Examples: - * "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z"). Complex - * types (enum, array, map, record). - * - * Generated from protobuf field string type = 5 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkString($var, True); - $this->type = $var; - - return $this; - } - - /** - * Optional. Field definition, needs to be specified if the type is record. - * Defines the nested fields. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.AspectType.MetadataTemplate record_fields = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRecordFields() - { - return $this->record_fields; - } - - /** - * Optional. Field definition, needs to be specified if the type is record. - * Defines the nested fields. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.AspectType.MetadataTemplate record_fields = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\Dataplex\V1\AspectType\MetadataTemplate>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRecordFields($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\AspectType\MetadataTemplate::class); - $this->record_fields = $arr; - - return $this; - } - - /** - * Optional. The list of values for an enum type. Needs to be defined if the - * type is enum. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.AspectType.MetadataTemplate.EnumValue enum_values = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEnumValues() - { - return $this->enum_values; - } - - /** - * Optional. The list of values for an enum type. Needs to be defined if the - * type is enum. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.AspectType.MetadataTemplate.EnumValue enum_values = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\Dataplex\V1\AspectType\MetadataTemplate\EnumValue>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEnumValues($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\AspectType\MetadataTemplate\EnumValue::class); - $this->enum_values = $arr; - - return $this; - } - - /** - * Optional. map_items needs to be set if the type is map. map_items can - * refer to a primitive field or a complex (record only) field. To specify a - * primitive field, just name and type needs to be set in the nested - * MetadataTemplate. The recommended value for the name field is item, as - * this is not used in the actual payload. - * - * Generated from protobuf field .google.cloud.dataplex.v1.AspectType.MetadataTemplate map_items = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataplex\V1\AspectType\MetadataTemplate|null - */ - public function getMapItems() - { - return $this->map_items; - } - - public function hasMapItems() - { - return isset($this->map_items); - } - - public function clearMapItems() - { - unset($this->map_items); - } - - /** - * Optional. map_items needs to be set if the type is map. map_items can - * refer to a primitive field or a complex (record only) field. To specify a - * primitive field, just name and type needs to be set in the nested - * MetadataTemplate. The recommended value for the name field is item, as - * this is not used in the actual payload. - * - * Generated from protobuf field .google.cloud.dataplex.v1.AspectType.MetadataTemplate map_items = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataplex\V1\AspectType\MetadataTemplate $var - * @return $this - */ - public function setMapItems($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\AspectType\MetadataTemplate::class); - $this->map_items = $var; - - return $this; - } - - /** - * Optional. array_items needs to be set if the type is array. array_items - * can refer to a primitive field or a complex (record only) field. To - * specify a primitive field, just name and type needs to be set in the - * nested MetadataTemplate. The recommended value for the name field is - * item, as this is not used in the actual payload. - * - * Generated from protobuf field .google.cloud.dataplex.v1.AspectType.MetadataTemplate array_items = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataplex\V1\AspectType\MetadataTemplate|null - */ - public function getArrayItems() - { - return $this->array_items; - } - - public function hasArrayItems() - { - return isset($this->array_items); - } - - public function clearArrayItems() - { - unset($this->array_items); - } - - /** - * Optional. array_items needs to be set if the type is array. array_items - * can refer to a primitive field or a complex (record only) field. To - * specify a primitive field, just name and type needs to be set in the - * nested MetadataTemplate. The recommended value for the name field is - * item, as this is not used in the actual payload. - * - * Generated from protobuf field .google.cloud.dataplex.v1.AspectType.MetadataTemplate array_items = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataplex\V1\AspectType\MetadataTemplate $var - * @return $this - */ - public function setArrayItems($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\AspectType\MetadataTemplate::class); - $this->array_items = $var; - - return $this; - } - - /** - * Optional. Id can be used if this definition of the field needs to be - * reused later. Id needs to be unique across the entire template. Id can - * only be specified if the field type is record. - * - * Generated from protobuf field string type_id = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getTypeId() - { - return $this->type_id; - } - - /** - * Optional. Id can be used if this definition of the field needs to be - * reused later. Id needs to be unique across the entire template. Id can - * only be specified if the field type is record. - * - * Generated from protobuf field string type_id = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setTypeId($var) - { - GPBUtil::checkString($var, True); - $this->type_id = $var; - - return $this; - } - - /** - * Optional. A reference to another field definition (instead of an inline - * definition). The value must be equal to the value of an id field defined - * elsewhere in the MetadataTemplate. Only fields with type as record can - * refer to other fields. - * - * Generated from protobuf field string type_ref = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getTypeRef() - { - return $this->type_ref; - } - - /** - * Optional. A reference to another field definition (instead of an inline - * definition). The value must be equal to the value of an id field defined - * elsewhere in the MetadataTemplate. Only fields with type as record can - * refer to other fields. - * - * Generated from protobuf field string type_ref = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setTypeRef($var) - { - GPBUtil::checkString($var, True); - $this->type_ref = $var; - - return $this; - } - - /** - * Optional. Specifies the constraints on this field. - * - * Generated from protobuf field .google.cloud.dataplex.v1.AspectType.MetadataTemplate.Constraints constraints = 50 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataplex\V1\AspectType\MetadataTemplate\Constraints|null - */ - public function getConstraints() - { - return $this->constraints; - } - - public function hasConstraints() - { - return isset($this->constraints); - } - - public function clearConstraints() - { - unset($this->constraints); - } - - /** - * Optional. Specifies the constraints on this field. - * - * Generated from protobuf field .google.cloud.dataplex.v1.AspectType.MetadataTemplate.Constraints constraints = 50 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataplex\V1\AspectType\MetadataTemplate\Constraints $var - * @return $this - */ - public function setConstraints($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\AspectType\MetadataTemplate\Constraints::class); - $this->constraints = $var; - - return $this; - } - - /** - * Optional. Specifies annotations on this field. - * - * Generated from protobuf field .google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations annotations = 51 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataplex\V1\AspectType\MetadataTemplate\Annotations|null - */ - public function getAnnotations() - { - return $this->annotations; - } - - public function hasAnnotations() - { - return isset($this->annotations); - } - - public function clearAnnotations() - { - unset($this->annotations); - } - - /** - * Optional. Specifies annotations on this field. - * - * Generated from protobuf field .google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations annotations = 51 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataplex\V1\AspectType\MetadataTemplate\Annotations $var - * @return $this - */ - public function setAnnotations($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\AspectType\MetadataTemplate\Annotations::class); - $this->annotations = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(MetadataTemplate::class, \Google\Cloud\Dataplex\V1\AspectType_MetadataTemplate::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/AspectType/MetadataTemplate/Annotations.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/AspectType/MetadataTemplate/Annotations.php deleted file mode 100644 index 0b87f7fbb710..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/AspectType/MetadataTemplate/Annotations.php +++ /dev/null @@ -1,264 +0,0 @@ -google.cloud.dataplex.v1.AspectType.MetadataTemplate.Annotations - */ -class Annotations extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Marks a field as deprecated, a deprecation message can be - * included. - * - * Generated from protobuf field string deprecated = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $deprecated = ''; - /** - * Optional. Specify a displayname for a field. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $display_name = ''; - /** - * Optional. Specify a description for a field - * - * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Optional. Specify a display order for a field. Display order can be - * used to reorder where a field is rendered - * - * Generated from protobuf field int32 display_order = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $display_order = 0; - /** - * Optional. String Type annotations can be used to specify special - * meaning to string fields. The following values are supported: richText: - * The field must be interpreted as a rich text field. url: A fully - * qualified url link. resource: A service qualified resource reference. - * - * Generated from protobuf field string string_type = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $string_type = ''; - /** - * Optional. Suggested hints for string fields. These can be used to - * suggest values to users, through an UI for example. - * - * Generated from protobuf field repeated string string_values = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $string_values; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $deprecated - * Optional. Marks a field as deprecated, a deprecation message can be - * included. - * @type string $display_name - * Optional. Specify a displayname for a field. - * @type string $description - * Optional. Specify a description for a field - * @type int $display_order - * Optional. Specify a display order for a field. Display order can be - * used to reorder where a field is rendered - * @type string $string_type - * Optional. String Type annotations can be used to specify special - * meaning to string fields. The following values are supported: richText: - * The field must be interpreted as a rich text field. url: A fully - * qualified url link. resource: A service qualified resource reference. - * @type array|\Google\Protobuf\Internal\RepeatedField $string_values - * Optional. Suggested hints for string fields. These can be used to - * suggest values to users, through an UI for example. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Catalog::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Marks a field as deprecated, a deprecation message can be - * included. - * - * Generated from protobuf field string deprecated = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDeprecated() - { - return $this->deprecated; - } - - /** - * Optional. Marks a field as deprecated, a deprecation message can be - * included. - * - * Generated from protobuf field string deprecated = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDeprecated($var) - { - GPBUtil::checkString($var, True); - $this->deprecated = $var; - - return $this; - } - - /** - * Optional. Specify a displayname for a field. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Optional. Specify a displayname for a field. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Optional. Specify a description for a field - * - * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. Specify a description for a field - * - * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Optional. Specify a display order for a field. Display order can be - * used to reorder where a field is rendered - * - * Generated from protobuf field int32 display_order = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getDisplayOrder() - { - return $this->display_order; - } - - /** - * Optional. Specify a display order for a field. Display order can be - * used to reorder where a field is rendered - * - * Generated from protobuf field int32 display_order = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setDisplayOrder($var) - { - GPBUtil::checkInt32($var); - $this->display_order = $var; - - return $this; - } - - /** - * Optional. String Type annotations can be used to specify special - * meaning to string fields. The following values are supported: richText: - * The field must be interpreted as a rich text field. url: A fully - * qualified url link. resource: A service qualified resource reference. - * - * Generated from protobuf field string string_type = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getStringType() - { - return $this->string_type; - } - - /** - * Optional. String Type annotations can be used to specify special - * meaning to string fields. The following values are supported: richText: - * The field must be interpreted as a rich text field. url: A fully - * qualified url link. resource: A service qualified resource reference. - * - * Generated from protobuf field string string_type = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setStringType($var) - { - GPBUtil::checkString($var, True); - $this->string_type = $var; - - return $this; - } - - /** - * Optional. Suggested hints for string fields. These can be used to - * suggest values to users, through an UI for example. - * - * Generated from protobuf field repeated string string_values = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getStringValues() - { - return $this->string_values; - } - - /** - * Optional. Suggested hints for string fields. These can be used to - * suggest values to users, through an UI for example. - * - * Generated from protobuf field repeated string string_values = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setStringValues($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->string_values = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Annotations::class, \Google\Cloud\Dataplex\V1\AspectType_MetadataTemplate_Annotations::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/AspectType/MetadataTemplate/Constraints.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/AspectType/MetadataTemplate/Constraints.php deleted file mode 100644 index 7f8a2f643c89..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/AspectType/MetadataTemplate/Constraints.php +++ /dev/null @@ -1,70 +0,0 @@ -google.cloud.dataplex.v1.AspectType.MetadataTemplate.Constraints - */ -class Constraints extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Marks this as an optional/required field. - * - * Generated from protobuf field bool required = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $required = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $required - * Optional. Marks this as an optional/required field. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Catalog::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Marks this as an optional/required field. - * - * Generated from protobuf field bool required = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getRequired() - { - return $this->required; - } - - /** - * Optional. Marks this as an optional/required field. - * - * Generated from protobuf field bool required = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setRequired($var) - { - GPBUtil::checkBool($var); - $this->required = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Constraints::class, \Google\Cloud\Dataplex\V1\AspectType_MetadataTemplate_Constraints::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/AspectType/MetadataTemplate/EnumValue.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/AspectType/MetadataTemplate/EnumValue.php deleted file mode 100644 index 41e59501674e..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/AspectType/MetadataTemplate/EnumValue.php +++ /dev/null @@ -1,146 +0,0 @@ -google.cloud.dataplex.v1.AspectType.MetadataTemplate.EnumValue - */ -class EnumValue extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Index for the enum. Cannot be modified. - * - * Generated from protobuf field int32 index = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $index = 0; - /** - * Required. Name of the enumvalue. This is the actual value that the - * aspect will contain. - * - * Generated from protobuf field string name = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Optional. Optional deprecation message to be set if an enum value needs - * to be deprecated. - * - * Generated from protobuf field string deprecated = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $deprecated = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $index - * Required. Index for the enum. Cannot be modified. - * @type string $name - * Required. Name of the enumvalue. This is the actual value that the - * aspect will contain. - * @type string $deprecated - * Optional. Optional deprecation message to be set if an enum value needs - * to be deprecated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Catalog::initOnce(); - parent::__construct($data); - } - - /** - * Required. Index for the enum. Cannot be modified. - * - * Generated from protobuf field int32 index = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getIndex() - { - return $this->index; - } - - /** - * Required. Index for the enum. Cannot be modified. - * - * Generated from protobuf field int32 index = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setIndex($var) - { - GPBUtil::checkInt32($var); - $this->index = $var; - - return $this; - } - - /** - * Required. Name of the enumvalue. This is the actual value that the - * aspect will contain. - * - * Generated from protobuf field string name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the enumvalue. This is the actual value that the - * aspect will contain. - * - * Generated from protobuf field string name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. Optional deprecation message to be set if an enum value needs - * to be deprecated. - * - * Generated from protobuf field string deprecated = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDeprecated() - { - return $this->deprecated; - } - - /** - * Optional. Optional deprecation message to be set if an enum value needs - * to be deprecated. - * - * Generated from protobuf field string deprecated = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDeprecated($var) - { - GPBUtil::checkString($var, True); - $this->deprecated = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(EnumValue::class, \Google\Cloud\Dataplex\V1\AspectType_MetadataTemplate_EnumValue::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset.php deleted file mode 100644 index 86dcebf8476a..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset.php +++ /dev/null @@ -1,574 +0,0 @@ -google.cloud.dataplex.v1.Asset - */ -class Asset extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The relative resource name of the asset, of the form: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. User friendly display name. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $display_name = ''; - /** - * Output only. System generated globally unique ID for the asset. This ID - * will be different if the asset is deleted and re-created with the same - * name. - * - * Generated from protobuf field string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - /** - * Output only. The time when the asset was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time when the asset was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Optional. User defined labels for the asset. - * - * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * Optional. Description of the asset. - * - * Generated from protobuf field string description = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Output only. Current state of the asset. - * - * Generated from protobuf field .google.cloud.dataplex.v1.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Required. Specification of the resource that is referenced by this asset. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Asset.ResourceSpec resource_spec = 100 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $resource_spec = null; - /** - * Output only. Status of the resource referenced by this asset. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Asset.ResourceStatus resource_status = 101 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $resource_status = null; - /** - * Output only. Status of the security policy applied to resource referenced - * by this asset. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Asset.SecurityStatus security_status = 103 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $security_status = null; - /** - * Optional. Specification of the discovery feature applied to data referenced - * by this asset. When this spec is left unset, the asset will use the spec - * set on the parent zone. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Asset.DiscoverySpec discovery_spec = 106 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $discovery_spec = null; - /** - * Output only. Status of the discovery feature applied to data referenced by - * this asset. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Asset.DiscoveryStatus discovery_status = 107 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $discovery_status = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The relative resource name of the asset, of the form: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. - * @type string $display_name - * Optional. User friendly display name. - * @type string $uid - * Output only. System generated globally unique ID for the asset. This ID - * will be different if the asset is deleted and re-created with the same - * name. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time when the asset was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time when the asset was last updated. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. User defined labels for the asset. - * @type string $description - * Optional. Description of the asset. - * @type int $state - * Output only. Current state of the asset. - * @type \Google\Cloud\Dataplex\V1\Asset\ResourceSpec $resource_spec - * Required. Specification of the resource that is referenced by this asset. - * @type \Google\Cloud\Dataplex\V1\Asset\ResourceStatus $resource_status - * Output only. Status of the resource referenced by this asset. - * @type \Google\Cloud\Dataplex\V1\Asset\SecurityStatus $security_status - * Output only. Status of the security policy applied to resource referenced - * by this asset. - * @type \Google\Cloud\Dataplex\V1\Asset\DiscoverySpec $discovery_spec - * Optional. Specification of the discovery feature applied to data referenced - * by this asset. When this spec is left unset, the asset will use the spec - * set on the parent zone. - * @type \Google\Cloud\Dataplex\V1\Asset\DiscoveryStatus $discovery_status - * Output only. Status of the discovery feature applied to data referenced by - * this asset. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The relative resource name of the asset, of the form: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The relative resource name of the asset, of the form: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. User friendly display name. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Optional. User friendly display name. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Output only. System generated globally unique ID for the asset. This ID - * will be different if the asset is deleted and re-created with the same - * name. - * - * Generated from protobuf field string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. System generated globally unique ID for the asset. This ID - * will be different if the asset is deleted and re-created with the same - * name. - * - * Generated from protobuf field string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - - /** - * Output only. The time when the asset was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time when the asset was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The time when the asset was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The time when the asset was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Optional. User defined labels for the asset. - * - * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. User defined labels for the asset. - * - * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Optional. Description of the asset. - * - * Generated from protobuf field string description = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. Description of the asset. - * - * Generated from protobuf field string description = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Output only. Current state of the asset. - * - * Generated from protobuf field .google.cloud.dataplex.v1.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. Current state of the asset. - * - * Generated from protobuf field .google.cloud.dataplex.v1.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\State::class); - $this->state = $var; - - return $this; - } - - /** - * Required. Specification of the resource that is referenced by this asset. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Asset.ResourceSpec resource_spec = 100 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataplex\V1\Asset\ResourceSpec|null - */ - public function getResourceSpec() - { - return $this->resource_spec; - } - - public function hasResourceSpec() - { - return isset($this->resource_spec); - } - - public function clearResourceSpec() - { - unset($this->resource_spec); - } - - /** - * Required. Specification of the resource that is referenced by this asset. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Asset.ResourceSpec resource_spec = 100 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataplex\V1\Asset\ResourceSpec $var - * @return $this - */ - public function setResourceSpec($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Asset\ResourceSpec::class); - $this->resource_spec = $var; - - return $this; - } - - /** - * Output only. Status of the resource referenced by this asset. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Asset.ResourceStatus resource_status = 101 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Dataplex\V1\Asset\ResourceStatus|null - */ - public function getResourceStatus() - { - return $this->resource_status; - } - - public function hasResourceStatus() - { - return isset($this->resource_status); - } - - public function clearResourceStatus() - { - unset($this->resource_status); - } - - /** - * Output only. Status of the resource referenced by this asset. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Asset.ResourceStatus resource_status = 101 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Dataplex\V1\Asset\ResourceStatus $var - * @return $this - */ - public function setResourceStatus($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Asset\ResourceStatus::class); - $this->resource_status = $var; - - return $this; - } - - /** - * Output only. Status of the security policy applied to resource referenced - * by this asset. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Asset.SecurityStatus security_status = 103 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Dataplex\V1\Asset\SecurityStatus|null - */ - public function getSecurityStatus() - { - return $this->security_status; - } - - public function hasSecurityStatus() - { - return isset($this->security_status); - } - - public function clearSecurityStatus() - { - unset($this->security_status); - } - - /** - * Output only. Status of the security policy applied to resource referenced - * by this asset. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Asset.SecurityStatus security_status = 103 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Dataplex\V1\Asset\SecurityStatus $var - * @return $this - */ - public function setSecurityStatus($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Asset\SecurityStatus::class); - $this->security_status = $var; - - return $this; - } - - /** - * Optional. Specification of the discovery feature applied to data referenced - * by this asset. When this spec is left unset, the asset will use the spec - * set on the parent zone. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Asset.DiscoverySpec discovery_spec = 106 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataplex\V1\Asset\DiscoverySpec|null - */ - public function getDiscoverySpec() - { - return $this->discovery_spec; - } - - public function hasDiscoverySpec() - { - return isset($this->discovery_spec); - } - - public function clearDiscoverySpec() - { - unset($this->discovery_spec); - } - - /** - * Optional. Specification of the discovery feature applied to data referenced - * by this asset. When this spec is left unset, the asset will use the spec - * set on the parent zone. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Asset.DiscoverySpec discovery_spec = 106 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataplex\V1\Asset\DiscoverySpec $var - * @return $this - */ - public function setDiscoverySpec($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Asset\DiscoverySpec::class); - $this->discovery_spec = $var; - - return $this; - } - - /** - * Output only. Status of the discovery feature applied to data referenced by - * this asset. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Asset.DiscoveryStatus discovery_status = 107 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Dataplex\V1\Asset\DiscoveryStatus|null - */ - public function getDiscoveryStatus() - { - return $this->discovery_status; - } - - public function hasDiscoveryStatus() - { - return isset($this->discovery_status); - } - - public function clearDiscoveryStatus() - { - unset($this->discovery_status); - } - - /** - * Output only. Status of the discovery feature applied to data referenced by - * this asset. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Asset.DiscoveryStatus discovery_status = 107 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Dataplex\V1\Asset\DiscoveryStatus $var - * @return $this - */ - public function setDiscoveryStatus($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Asset\DiscoveryStatus::class); - $this->discovery_status = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/DiscoverySpec.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/DiscoverySpec.php deleted file mode 100644 index 6fa21b6e43c2..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/DiscoverySpec.php +++ /dev/null @@ -1,317 +0,0 @@ -google.cloud.dataplex.v1.Asset.DiscoverySpec - */ -class DiscoverySpec extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Whether discovery is enabled. - * - * Generated from protobuf field bool enabled = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $enabled = false; - /** - * Optional. The list of patterns to apply for selecting data to include - * during discovery if only a subset of the data should considered. For - * Cloud Storage bucket assets, these are interpreted as glob patterns used - * to match object names. For BigQuery dataset assets, these are interpreted - * as patterns to match table names. - * - * Generated from protobuf field repeated string include_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $include_patterns; - /** - * Optional. The list of patterns to apply for selecting data to exclude - * during discovery. For Cloud Storage bucket assets, these are interpreted - * as glob patterns used to match object names. For BigQuery dataset assets, - * these are interpreted as patterns to match table names. - * - * Generated from protobuf field repeated string exclude_patterns = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $exclude_patterns; - /** - * Optional. Configuration for CSV data. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions csv_options = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $csv_options = null; - /** - * Optional. Configuration for Json data. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions json_options = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $json_options = null; - protected $trigger; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $enabled - * Optional. Whether discovery is enabled. - * @type array|\Google\Protobuf\Internal\RepeatedField $include_patterns - * Optional. The list of patterns to apply for selecting data to include - * during discovery if only a subset of the data should considered. For - * Cloud Storage bucket assets, these are interpreted as glob patterns used - * to match object names. For BigQuery dataset assets, these are interpreted - * as patterns to match table names. - * @type array|\Google\Protobuf\Internal\RepeatedField $exclude_patterns - * Optional. The list of patterns to apply for selecting data to exclude - * during discovery. For Cloud Storage bucket assets, these are interpreted - * as glob patterns used to match object names. For BigQuery dataset assets, - * these are interpreted as patterns to match table names. - * @type \Google\Cloud\Dataplex\V1\Asset\DiscoverySpec\CsvOptions $csv_options - * Optional. Configuration for CSV data. - * @type \Google\Cloud\Dataplex\V1\Asset\DiscoverySpec\JsonOptions $json_options - * Optional. Configuration for Json data. - * @type string $schedule - * Optional. Cron schedule (https://en.wikipedia.org/wiki/Cron) for - * running discovery periodically. Successive discovery runs must be - * scheduled at least 60 minutes apart. The default value is to run - * discovery every 60 minutes. To explicitly set a timezone to the cron - * tab, apply a prefix in the cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or - * TZ=${IANA_TIME_ZONE}". The ${IANA_TIME_ZONE} may only be a valid string - * from IANA time zone database. For example, `CRON_TZ=America/New_York 1 - * * * * *`, or `TZ=America/New_York 1 * * * *`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Whether discovery is enabled. - * - * Generated from protobuf field bool enabled = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getEnabled() - { - return $this->enabled; - } - - /** - * Optional. Whether discovery is enabled. - * - * Generated from protobuf field bool enabled = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setEnabled($var) - { - GPBUtil::checkBool($var); - $this->enabled = $var; - - return $this; - } - - /** - * Optional. The list of patterns to apply for selecting data to include - * during discovery if only a subset of the data should considered. For - * Cloud Storage bucket assets, these are interpreted as glob patterns used - * to match object names. For BigQuery dataset assets, these are interpreted - * as patterns to match table names. - * - * Generated from protobuf field repeated string include_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getIncludePatterns() - { - return $this->include_patterns; - } - - /** - * Optional. The list of patterns to apply for selecting data to include - * during discovery if only a subset of the data should considered. For - * Cloud Storage bucket assets, these are interpreted as glob patterns used - * to match object names. For BigQuery dataset assets, these are interpreted - * as patterns to match table names. - * - * Generated from protobuf field repeated string include_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setIncludePatterns($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->include_patterns = $arr; - - return $this; - } - - /** - * Optional. The list of patterns to apply for selecting data to exclude - * during discovery. For Cloud Storage bucket assets, these are interpreted - * as glob patterns used to match object names. For BigQuery dataset assets, - * these are interpreted as patterns to match table names. - * - * Generated from protobuf field repeated string exclude_patterns = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getExcludePatterns() - { - return $this->exclude_patterns; - } - - /** - * Optional. The list of patterns to apply for selecting data to exclude - * during discovery. For Cloud Storage bucket assets, these are interpreted - * as glob patterns used to match object names. For BigQuery dataset assets, - * these are interpreted as patterns to match table names. - * - * Generated from protobuf field repeated string exclude_patterns = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setExcludePatterns($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->exclude_patterns = $arr; - - return $this; - } - - /** - * Optional. Configuration for CSV data. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions csv_options = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataplex\V1\Asset\DiscoverySpec\CsvOptions|null - */ - public function getCsvOptions() - { - return $this->csv_options; - } - - public function hasCsvOptions() - { - return isset($this->csv_options); - } - - public function clearCsvOptions() - { - unset($this->csv_options); - } - - /** - * Optional. Configuration for CSV data. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions csv_options = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataplex\V1\Asset\DiscoverySpec\CsvOptions $var - * @return $this - */ - public function setCsvOptions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Asset\DiscoverySpec\CsvOptions::class); - $this->csv_options = $var; - - return $this; - } - - /** - * Optional. Configuration for Json data. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions json_options = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataplex\V1\Asset\DiscoverySpec\JsonOptions|null - */ - public function getJsonOptions() - { - return $this->json_options; - } - - public function hasJsonOptions() - { - return isset($this->json_options); - } - - public function clearJsonOptions() - { - unset($this->json_options); - } - - /** - * Optional. Configuration for Json data. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions json_options = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataplex\V1\Asset\DiscoverySpec\JsonOptions $var - * @return $this - */ - public function setJsonOptions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Asset\DiscoverySpec\JsonOptions::class); - $this->json_options = $var; - - return $this; - } - - /** - * Optional. Cron schedule (https://en.wikipedia.org/wiki/Cron) for - * running discovery periodically. Successive discovery runs must be - * scheduled at least 60 minutes apart. The default value is to run - * discovery every 60 minutes. To explicitly set a timezone to the cron - * tab, apply a prefix in the cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or - * TZ=${IANA_TIME_ZONE}". The ${IANA_TIME_ZONE} may only be a valid string - * from IANA time zone database. For example, `CRON_TZ=America/New_York 1 - * * * * *`, or `TZ=America/New_York 1 * * * *`. - * - * Generated from protobuf field string schedule = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getSchedule() - { - return $this->readOneof(10); - } - - public function hasSchedule() - { - return $this->hasOneof(10); - } - - /** - * Optional. Cron schedule (https://en.wikipedia.org/wiki/Cron) for - * running discovery periodically. Successive discovery runs must be - * scheduled at least 60 minutes apart. The default value is to run - * discovery every 60 minutes. To explicitly set a timezone to the cron - * tab, apply a prefix in the cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or - * TZ=${IANA_TIME_ZONE}". The ${IANA_TIME_ZONE} may only be a valid string - * from IANA time zone database. For example, `CRON_TZ=America/New_York 1 - * * * * *`, or `TZ=America/New_York 1 * * * *`. - * - * Generated from protobuf field string schedule = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setSchedule($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(10, $var); - - return $this; - } - - /** - * @return string - */ - public function getTrigger() - { - return $this->whichOneof("trigger"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DiscoverySpec::class, \Google\Cloud\Dataplex\V1\Asset_DiscoverySpec::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/DiscoverySpec/CsvOptions.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/DiscoverySpec/CsvOptions.php deleted file mode 100644 index 3380aa019da7..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/DiscoverySpec/CsvOptions.php +++ /dev/null @@ -1,184 +0,0 @@ -google.cloud.dataplex.v1.Asset.DiscoverySpec.CsvOptions - */ -class CsvOptions extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The number of rows to interpret as header rows that should be - * skipped when reading data rows. - * - * Generated from protobuf field int32 header_rows = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $header_rows = 0; - /** - * Optional. The delimiter being used to separate values. This defaults to - * ','. - * - * Generated from protobuf field string delimiter = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $delimiter = ''; - /** - * Optional. The character encoding of the data. The default is UTF-8. - * - * Generated from protobuf field string encoding = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $encoding = ''; - /** - * Optional. Whether to disable the inference of data type for CSV data. - * If true, all columns will be registered as strings. - * - * Generated from protobuf field bool disable_type_inference = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $disable_type_inference = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $header_rows - * Optional. The number of rows to interpret as header rows that should be - * skipped when reading data rows. - * @type string $delimiter - * Optional. The delimiter being used to separate values. This defaults to - * ','. - * @type string $encoding - * Optional. The character encoding of the data. The default is UTF-8. - * @type bool $disable_type_inference - * Optional. Whether to disable the inference of data type for CSV data. - * If true, all columns will be registered as strings. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The number of rows to interpret as header rows that should be - * skipped when reading data rows. - * - * Generated from protobuf field int32 header_rows = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getHeaderRows() - { - return $this->header_rows; - } - - /** - * Optional. The number of rows to interpret as header rows that should be - * skipped when reading data rows. - * - * Generated from protobuf field int32 header_rows = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setHeaderRows($var) - { - GPBUtil::checkInt32($var); - $this->header_rows = $var; - - return $this; - } - - /** - * Optional. The delimiter being used to separate values. This defaults to - * ','. - * - * Generated from protobuf field string delimiter = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDelimiter() - { - return $this->delimiter; - } - - /** - * Optional. The delimiter being used to separate values. This defaults to - * ','. - * - * Generated from protobuf field string delimiter = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDelimiter($var) - { - GPBUtil::checkString($var, True); - $this->delimiter = $var; - - return $this; - } - - /** - * Optional. The character encoding of the data. The default is UTF-8. - * - * Generated from protobuf field string encoding = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getEncoding() - { - return $this->encoding; - } - - /** - * Optional. The character encoding of the data. The default is UTF-8. - * - * Generated from protobuf field string encoding = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setEncoding($var) - { - GPBUtil::checkString($var, True); - $this->encoding = $var; - - return $this; - } - - /** - * Optional. Whether to disable the inference of data type for CSV data. - * If true, all columns will be registered as strings. - * - * Generated from protobuf field bool disable_type_inference = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getDisableTypeInference() - { - return $this->disable_type_inference; - } - - /** - * Optional. Whether to disable the inference of data type for CSV data. - * If true, all columns will be registered as strings. - * - * Generated from protobuf field bool disable_type_inference = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setDisableTypeInference($var) - { - GPBUtil::checkBool($var); - $this->disable_type_inference = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CsvOptions::class, \Google\Cloud\Dataplex\V1\Asset_DiscoverySpec_CsvOptions::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/DiscoverySpec/JsonOptions.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/DiscoverySpec/JsonOptions.php deleted file mode 100644 index ac4b34455c86..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/DiscoverySpec/JsonOptions.php +++ /dev/null @@ -1,112 +0,0 @@ -google.cloud.dataplex.v1.Asset.DiscoverySpec.JsonOptions - */ -class JsonOptions extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The character encoding of the data. The default is UTF-8. - * - * Generated from protobuf field string encoding = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $encoding = ''; - /** - * Optional. Whether to disable the inference of data type for Json data. - * If true, all columns will be registered as their primitive types - * (strings, number or boolean). - * - * Generated from protobuf field bool disable_type_inference = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $disable_type_inference = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $encoding - * Optional. The character encoding of the data. The default is UTF-8. - * @type bool $disable_type_inference - * Optional. Whether to disable the inference of data type for Json data. - * If true, all columns will be registered as their primitive types - * (strings, number or boolean). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The character encoding of the data. The default is UTF-8. - * - * Generated from protobuf field string encoding = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getEncoding() - { - return $this->encoding; - } - - /** - * Optional. The character encoding of the data. The default is UTF-8. - * - * Generated from protobuf field string encoding = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setEncoding($var) - { - GPBUtil::checkString($var, True); - $this->encoding = $var; - - return $this; - } - - /** - * Optional. Whether to disable the inference of data type for Json data. - * If true, all columns will be registered as their primitive types - * (strings, number or boolean). - * - * Generated from protobuf field bool disable_type_inference = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getDisableTypeInference() - { - return $this->disable_type_inference; - } - - /** - * Optional. Whether to disable the inference of data type for Json data. - * If true, all columns will be registered as their primitive types - * (strings, number or boolean). - * - * Generated from protobuf field bool disable_type_inference = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setDisableTypeInference($var) - { - GPBUtil::checkBool($var); - $this->disable_type_inference = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(JsonOptions::class, \Google\Cloud\Dataplex\V1\Asset_DiscoverySpec_JsonOptions::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/DiscoveryStatus.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/DiscoveryStatus.php deleted file mode 100644 index fb128a346880..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/DiscoveryStatus.php +++ /dev/null @@ -1,280 +0,0 @@ -google.cloud.dataplex.v1.Asset.DiscoveryStatus - */ -class DiscoveryStatus extends \Google\Protobuf\Internal\Message -{ - /** - * The current status of the discovery feature. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Asset.DiscoveryStatus.State state = 1; - */ - protected $state = 0; - /** - * Additional information about the current state. - * - * Generated from protobuf field string message = 2; - */ - protected $message = ''; - /** - * Last update time of the status. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; - */ - protected $update_time = null; - /** - * The start time of the last discovery run. - * - * Generated from protobuf field .google.protobuf.Timestamp last_run_time = 4; - */ - protected $last_run_time = null; - /** - * Data Stats of the asset reported by discovery. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats stats = 6; - */ - protected $stats = null; - /** - * The duration of the last discovery run. - * - * Generated from protobuf field .google.protobuf.Duration last_run_duration = 7; - */ - protected $last_run_duration = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $state - * The current status of the discovery feature. - * @type string $message - * Additional information about the current state. - * @type \Google\Protobuf\Timestamp $update_time - * Last update time of the status. - * @type \Google\Protobuf\Timestamp $last_run_time - * The start time of the last discovery run. - * @type \Google\Cloud\Dataplex\V1\Asset\DiscoveryStatus\Stats $stats - * Data Stats of the asset reported by discovery. - * @type \Google\Protobuf\Duration $last_run_duration - * The duration of the last discovery run. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The current status of the discovery feature. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Asset.DiscoveryStatus.State state = 1; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * The current status of the discovery feature. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Asset.DiscoveryStatus.State state = 1; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\Asset\DiscoveryStatus\State::class); - $this->state = $var; - - return $this; - } - - /** - * Additional information about the current state. - * - * Generated from protobuf field string message = 2; - * @return string - */ - public function getMessage() - { - return $this->message; - } - - /** - * Additional information about the current state. - * - * Generated from protobuf field string message = 2; - * @param string $var - * @return $this - */ - public function setMessage($var) - { - GPBUtil::checkString($var, True); - $this->message = $var; - - return $this; - } - - /** - * Last update time of the status. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Last update time of the status. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * The start time of the last discovery run. - * - * Generated from protobuf field .google.protobuf.Timestamp last_run_time = 4; - * @return \Google\Protobuf\Timestamp|null - */ - public function getLastRunTime() - { - return $this->last_run_time; - } - - public function hasLastRunTime() - { - return isset($this->last_run_time); - } - - public function clearLastRunTime() - { - unset($this->last_run_time); - } - - /** - * The start time of the last discovery run. - * - * Generated from protobuf field .google.protobuf.Timestamp last_run_time = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setLastRunTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->last_run_time = $var; - - return $this; - } - - /** - * Data Stats of the asset reported by discovery. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats stats = 6; - * @return \Google\Cloud\Dataplex\V1\Asset\DiscoveryStatus\Stats|null - */ - public function getStats() - { - return $this->stats; - } - - public function hasStats() - { - return isset($this->stats); - } - - public function clearStats() - { - unset($this->stats); - } - - /** - * Data Stats of the asset reported by discovery. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats stats = 6; - * @param \Google\Cloud\Dataplex\V1\Asset\DiscoveryStatus\Stats $var - * @return $this - */ - public function setStats($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Asset\DiscoveryStatus\Stats::class); - $this->stats = $var; - - return $this; - } - - /** - * The duration of the last discovery run. - * - * Generated from protobuf field .google.protobuf.Duration last_run_duration = 7; - * @return \Google\Protobuf\Duration|null - */ - public function getLastRunDuration() - { - return $this->last_run_duration; - } - - public function hasLastRunDuration() - { - return isset($this->last_run_duration); - } - - public function clearLastRunDuration() - { - unset($this->last_run_duration); - } - - /** - * The duration of the last discovery run. - * - * Generated from protobuf field .google.protobuf.Duration last_run_duration = 7; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setLastRunDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->last_run_duration = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DiscoveryStatus::class, \Google\Cloud\Dataplex\V1\Asset_DiscoveryStatus::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/DiscoveryStatus/State.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/DiscoveryStatus/State.php deleted file mode 100644 index 25093e6007a0..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/DiscoveryStatus/State.php +++ /dev/null @@ -1,79 +0,0 @@ -google.cloud.dataplex.v1.Asset.DiscoveryStatus.State - */ -class State -{ - /** - * State is unspecified. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Discovery for the asset is scheduled. - * - * Generated from protobuf enum SCHEDULED = 1; - */ - const SCHEDULED = 1; - /** - * Discovery for the asset is running. - * - * Generated from protobuf enum IN_PROGRESS = 2; - */ - const IN_PROGRESS = 2; - /** - * Discovery for the asset is currently paused (e.g. due to a lack - * of available resources). It will be automatically resumed. - * - * Generated from protobuf enum PAUSED = 3; - */ - const PAUSED = 3; - /** - * Discovery for the asset is disabled. - * - * Generated from protobuf enum DISABLED = 5; - */ - const DISABLED = 5; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::SCHEDULED => 'SCHEDULED', - self::IN_PROGRESS => 'IN_PROGRESS', - self::PAUSED => 'PAUSED', - self::DISABLED => 'DISABLED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\Dataplex\V1\Asset_DiscoveryStatus_State::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/DiscoveryStatus/Stats.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/DiscoveryStatus/Stats.php deleted file mode 100644 index 0b04d36fd07b..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/DiscoveryStatus/Stats.php +++ /dev/null @@ -1,172 +0,0 @@ -google.cloud.dataplex.v1.Asset.DiscoveryStatus.Stats - */ -class Stats extends \Google\Protobuf\Internal\Message -{ - /** - * The count of data items within the referenced resource. - * - * Generated from protobuf field int64 data_items = 1; - */ - protected $data_items = 0; - /** - * The number of stored data bytes within the referenced resource. - * - * Generated from protobuf field int64 data_size = 2; - */ - protected $data_size = 0; - /** - * The count of table entities within the referenced resource. - * - * Generated from protobuf field int64 tables = 3; - */ - protected $tables = 0; - /** - * The count of fileset entities within the referenced resource. - * - * Generated from protobuf field int64 filesets = 4; - */ - protected $filesets = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $data_items - * The count of data items within the referenced resource. - * @type int|string $data_size - * The number of stored data bytes within the referenced resource. - * @type int|string $tables - * The count of table entities within the referenced resource. - * @type int|string $filesets - * The count of fileset entities within the referenced resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The count of data items within the referenced resource. - * - * Generated from protobuf field int64 data_items = 1; - * @return int|string - */ - public function getDataItems() - { - return $this->data_items; - } - - /** - * The count of data items within the referenced resource. - * - * Generated from protobuf field int64 data_items = 1; - * @param int|string $var - * @return $this - */ - public function setDataItems($var) - { - GPBUtil::checkInt64($var); - $this->data_items = $var; - - return $this; - } - - /** - * The number of stored data bytes within the referenced resource. - * - * Generated from protobuf field int64 data_size = 2; - * @return int|string - */ - public function getDataSize() - { - return $this->data_size; - } - - /** - * The number of stored data bytes within the referenced resource. - * - * Generated from protobuf field int64 data_size = 2; - * @param int|string $var - * @return $this - */ - public function setDataSize($var) - { - GPBUtil::checkInt64($var); - $this->data_size = $var; - - return $this; - } - - /** - * The count of table entities within the referenced resource. - * - * Generated from protobuf field int64 tables = 3; - * @return int|string - */ - public function getTables() - { - return $this->tables; - } - - /** - * The count of table entities within the referenced resource. - * - * Generated from protobuf field int64 tables = 3; - * @param int|string $var - * @return $this - */ - public function setTables($var) - { - GPBUtil::checkInt64($var); - $this->tables = $var; - - return $this; - } - - /** - * The count of fileset entities within the referenced resource. - * - * Generated from protobuf field int64 filesets = 4; - * @return int|string - */ - public function getFilesets() - { - return $this->filesets; - } - - /** - * The count of fileset entities within the referenced resource. - * - * Generated from protobuf field int64 filesets = 4; - * @param int|string $var - * @return $this - */ - public function setFilesets($var) - { - GPBUtil::checkInt64($var); - $this->filesets = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Stats::class, \Google\Cloud\Dataplex\V1\Asset_DiscoveryStatus_Stats::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/ResourceSpec.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/ResourceSpec.php deleted file mode 100644 index 154209d8aae2..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/ResourceSpec.php +++ /dev/null @@ -1,154 +0,0 @@ -google.cloud.dataplex.v1.Asset.ResourceSpec - */ -class ResourceSpec extends \Google\Protobuf\Internal\Message -{ - /** - * Immutable. Relative name of the cloud resource that contains the data - * that is being managed within a lake. For example: - * `projects/{project_number}/buckets/{bucket_id}` - * `projects/{project_number}/datasets/{dataset_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $name = ''; - /** - * Required. Immutable. Type of resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Asset.ResourceSpec.Type type = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - */ - protected $type = 0; - /** - * Optional. Determines how read permissions are handled for each asset and - * their associated tables. Only available to storage buckets assets. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Asset.ResourceSpec.AccessMode read_access_mode = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $read_access_mode = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Immutable. Relative name of the cloud resource that contains the data - * that is being managed within a lake. For example: - * `projects/{project_number}/buckets/{bucket_id}` - * `projects/{project_number}/datasets/{dataset_id}` - * @type int $type - * Required. Immutable. Type of resource. - * @type int $read_access_mode - * Optional. Determines how read permissions are handled for each asset and - * their associated tables. Only available to storage buckets assets. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Immutable. Relative name of the cloud resource that contains the data - * that is being managed within a lake. For example: - * `projects/{project_number}/buckets/{bucket_id}` - * `projects/{project_number}/datasets/{dataset_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Immutable. Relative name of the cloud resource that contains the data - * that is being managed within a lake. For example: - * `projects/{project_number}/buckets/{bucket_id}` - * `projects/{project_number}/datasets/{dataset_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. Immutable. Type of resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Asset.ResourceSpec.Type type = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Required. Immutable. Type of resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Asset.ResourceSpec.Type type = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\Asset\ResourceSpec\Type::class); - $this->type = $var; - - return $this; - } - - /** - * Optional. Determines how read permissions are handled for each asset and - * their associated tables. Only available to storage buckets assets. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Asset.ResourceSpec.AccessMode read_access_mode = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getReadAccessMode() - { - return $this->read_access_mode; - } - - /** - * Optional. Determines how read permissions are handled for each asset and - * their associated tables. Only available to storage buckets assets. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Asset.ResourceSpec.AccessMode read_access_mode = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setReadAccessMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\Asset\ResourceSpec\AccessMode::class); - $this->read_access_mode = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ResourceSpec::class, \Google\Cloud\Dataplex\V1\Asset_ResourceSpec::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/ResourceSpec/AccessMode.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/ResourceSpec/AccessMode.php deleted file mode 100644 index 5eefd16cbb83..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/ResourceSpec/AccessMode.php +++ /dev/null @@ -1,65 +0,0 @@ -google.cloud.dataplex.v1.Asset.ResourceSpec.AccessMode - */ -class AccessMode -{ - /** - * Access mode unspecified. - * - * Generated from protobuf enum ACCESS_MODE_UNSPECIFIED = 0; - */ - const ACCESS_MODE_UNSPECIFIED = 0; - /** - * Default. Data is accessed directly using storage APIs. - * - * Generated from protobuf enum DIRECT = 1; - */ - const DIRECT = 1; - /** - * Data is accessed through a managed interface using BigQuery APIs. - * - * Generated from protobuf enum MANAGED = 2; - */ - const MANAGED = 2; - - private static $valueToName = [ - self::ACCESS_MODE_UNSPECIFIED => 'ACCESS_MODE_UNSPECIFIED', - self::DIRECT => 'DIRECT', - self::MANAGED => 'MANAGED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(AccessMode::class, \Google\Cloud\Dataplex\V1\Asset_ResourceSpec_AccessMode::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/ResourceSpec/Type.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/ResourceSpec/Type.php deleted file mode 100644 index b0a24b084e6c..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/ResourceSpec/Type.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.dataplex.v1.Asset.ResourceSpec.Type - */ -class Type -{ - /** - * Type not specified. - * - * Generated from protobuf enum TYPE_UNSPECIFIED = 0; - */ - const TYPE_UNSPECIFIED = 0; - /** - * Cloud Storage bucket. - * - * Generated from protobuf enum STORAGE_BUCKET = 1; - */ - const STORAGE_BUCKET = 1; - /** - * BigQuery dataset. - * - * Generated from protobuf enum BIGQUERY_DATASET = 2; - */ - const BIGQUERY_DATASET = 2; - - private static $valueToName = [ - self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', - self::STORAGE_BUCKET => 'STORAGE_BUCKET', - self::BIGQUERY_DATASET => 'BIGQUERY_DATASET', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Type::class, \Google\Cloud\Dataplex\V1\Asset_ResourceSpec_Type::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/ResourceStatus.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/ResourceStatus.php deleted file mode 100644 index 4a82e4f8b674..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/ResourceStatus.php +++ /dev/null @@ -1,182 +0,0 @@ -google.cloud.dataplex.v1.Asset.ResourceStatus - */ -class ResourceStatus extends \Google\Protobuf\Internal\Message -{ - /** - * The current state of the managed resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Asset.ResourceStatus.State state = 1; - */ - protected $state = 0; - /** - * Additional information about the current state. - * - * Generated from protobuf field string message = 2; - */ - protected $message = ''; - /** - * Last update time of the status. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; - */ - protected $update_time = null; - /** - * Output only. Service account associated with the BigQuery Connection. - * - * Generated from protobuf field string managed_access_identity = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $managed_access_identity = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $state - * The current state of the managed resource. - * @type string $message - * Additional information about the current state. - * @type \Google\Protobuf\Timestamp $update_time - * Last update time of the status. - * @type string $managed_access_identity - * Output only. Service account associated with the BigQuery Connection. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The current state of the managed resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Asset.ResourceStatus.State state = 1; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * The current state of the managed resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Asset.ResourceStatus.State state = 1; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\Asset\ResourceStatus\State::class); - $this->state = $var; - - return $this; - } - - /** - * Additional information about the current state. - * - * Generated from protobuf field string message = 2; - * @return string - */ - public function getMessage() - { - return $this->message; - } - - /** - * Additional information about the current state. - * - * Generated from protobuf field string message = 2; - * @param string $var - * @return $this - */ - public function setMessage($var) - { - GPBUtil::checkString($var, True); - $this->message = $var; - - return $this; - } - - /** - * Last update time of the status. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Last update time of the status. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Output only. Service account associated with the BigQuery Connection. - * - * Generated from protobuf field string managed_access_identity = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getManagedAccessIdentity() - { - return $this->managed_access_identity; - } - - /** - * Output only. Service account associated with the BigQuery Connection. - * - * Generated from protobuf field string managed_access_identity = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setManagedAccessIdentity($var) - { - GPBUtil::checkString($var, True); - $this->managed_access_identity = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ResourceStatus::class, \Google\Cloud\Dataplex\V1\Asset_ResourceStatus::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/ResourceStatus/State.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/ResourceStatus/State.php deleted file mode 100644 index a3d2646b2682..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/ResourceStatus/State.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.dataplex.v1.Asset.ResourceStatus.State - */ -class State -{ - /** - * State unspecified. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Resource does not have any errors. - * - * Generated from protobuf enum READY = 1; - */ - const READY = 1; - /** - * Resource has errors. - * - * Generated from protobuf enum ERROR = 2; - */ - const ERROR = 2; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::READY => 'READY', - self::ERROR => 'ERROR', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\Dataplex\V1\Asset_ResourceStatus_State::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/SecurityStatus.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/SecurityStatus.php deleted file mode 100644 index 0551695cf24e..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/SecurityStatus.php +++ /dev/null @@ -1,153 +0,0 @@ -google.cloud.dataplex.v1.Asset.SecurityStatus - */ -class SecurityStatus extends \Google\Protobuf\Internal\Message -{ - /** - * The current state of the security policy applied to the attached - * resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Asset.SecurityStatus.State state = 1; - */ - protected $state = 0; - /** - * Additional information about the current state. - * - * Generated from protobuf field string message = 2; - */ - protected $message = ''; - /** - * Last update time of the status. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; - */ - protected $update_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $state - * The current state of the security policy applied to the attached - * resource. - * @type string $message - * Additional information about the current state. - * @type \Google\Protobuf\Timestamp $update_time - * Last update time of the status. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The current state of the security policy applied to the attached - * resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Asset.SecurityStatus.State state = 1; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * The current state of the security policy applied to the attached - * resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Asset.SecurityStatus.State state = 1; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\Asset\SecurityStatus\State::class); - $this->state = $var; - - return $this; - } - - /** - * Additional information about the current state. - * - * Generated from protobuf field string message = 2; - * @return string - */ - public function getMessage() - { - return $this->message; - } - - /** - * Additional information about the current state. - * - * Generated from protobuf field string message = 2; - * @param string $var - * @return $this - */ - public function setMessage($var) - { - GPBUtil::checkString($var, True); - $this->message = $var; - - return $this; - } - - /** - * Last update time of the status. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Last update time of the status. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SecurityStatus::class, \Google\Cloud\Dataplex\V1\Asset_SecurityStatus::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/SecurityStatus/State.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/SecurityStatus/State.php deleted file mode 100644 index 306952bcbe0b..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Asset/SecurityStatus/State.php +++ /dev/null @@ -1,73 +0,0 @@ -google.cloud.dataplex.v1.Asset.SecurityStatus.State - */ -class State -{ - /** - * State unspecified. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Security policy has been successfully applied to the attached resource. - * - * Generated from protobuf enum READY = 1; - */ - const READY = 1; - /** - * Security policy is in the process of being applied to the attached - * resource. - * - * Generated from protobuf enum APPLYING = 2; - */ - const APPLYING = 2; - /** - * Security policy could not be applied to the attached resource due to - * errors. - * - * Generated from protobuf enum ERROR = 3; - */ - const ERROR = 3; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::READY => 'READY', - self::APPLYING => 'APPLYING', - self::ERROR => 'ERROR', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\Dataplex\V1\Asset_SecurityStatus_State::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/AssetStatus.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/AssetStatus.php deleted file mode 100644 index 0ac2ee4ec6d3..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/AssetStatus.php +++ /dev/null @@ -1,149 +0,0 @@ -google.cloud.dataplex.v1.AssetStatus - */ -class AssetStatus extends \Google\Protobuf\Internal\Message -{ - /** - * Last update time of the status. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 1; - */ - protected $update_time = null; - /** - * Number of active assets. - * - * Generated from protobuf field int32 active_assets = 2; - */ - protected $active_assets = 0; - /** - * Number of assets that are in process of updating the security policy on - * attached resources. - * - * Generated from protobuf field int32 security_policy_applying_assets = 3; - */ - protected $security_policy_applying_assets = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $update_time - * Last update time of the status. - * @type int $active_assets - * Number of active assets. - * @type int $security_policy_applying_assets - * Number of assets that are in process of updating the security policy on - * attached resources. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Last update time of the status. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Last update time of the status. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Number of active assets. - * - * Generated from protobuf field int32 active_assets = 2; - * @return int - */ - public function getActiveAssets() - { - return $this->active_assets; - } - - /** - * Number of active assets. - * - * Generated from protobuf field int32 active_assets = 2; - * @param int $var - * @return $this - */ - public function setActiveAssets($var) - { - GPBUtil::checkInt32($var); - $this->active_assets = $var; - - return $this; - } - - /** - * Number of assets that are in process of updating the security policy on - * attached resources. - * - * Generated from protobuf field int32 security_policy_applying_assets = 3; - * @return int - */ - public function getSecurityPolicyApplyingAssets() - { - return $this->security_policy_applying_assets; - } - - /** - * Number of assets that are in process of updating the security policy on - * attached resources. - * - * Generated from protobuf field int32 security_policy_applying_assets = 3; - * @param int $var - * @return $this - */ - public function setSecurityPolicyApplyingAssets($var) - { - GPBUtil::checkInt32($var); - $this->security_policy_applying_assets = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CancelJobRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CancelJobRequest.php deleted file mode 100644 index 39eaf72e4716..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CancelJobRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.dataplex.v1.CancelJobRequest - */ -class CancelJobRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the job: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}/job/{job_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The resource name of the job: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}/job/{job_id}`. Please see - * {@see DataplexServiceClient::jobName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\CancelJobRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the job: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}/job/{job_id}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the job: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}/job/{job_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the job: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}/job/{job_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Content.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Content.php deleted file mode 100644 index bdf804b99374..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Content.php +++ /dev/null @@ -1,428 +0,0 @@ -google.cloud.dataplex.v1.Content - */ -class Content extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The relative resource name of the content, of the form: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Output only. System generated globally unique ID for the content. This ID - * will be different if the content is deleted and re-created with the same - * name. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - /** - * Required. The path for the Content file, represented as directory - * structure. Unique within a lake. Limited to alphanumerics, hyphens, - * underscores, dots and slashes. - * - * Generated from protobuf field string path = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $path = ''; - /** - * Output only. Content creation time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time when the content was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Optional. User defined labels for the content. - * - * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * Optional. Description of the content. - * - * Generated from protobuf field string description = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - protected $data; - protected $content; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The relative resource name of the content, of the form: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id} - * @type string $uid - * Output only. System generated globally unique ID for the content. This ID - * will be different if the content is deleted and re-created with the same - * name. - * @type string $path - * Required. The path for the Content file, represented as directory - * structure. Unique within a lake. Limited to alphanumerics, hyphens, - * underscores, dots and slashes. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. Content creation time. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time when the content was last updated. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. User defined labels for the content. - * @type string $description - * Optional. Description of the content. - * @type string $data_text - * Required. Content data in string format. - * @type \Google\Cloud\Dataplex\V1\Content\SqlScript $sql_script - * Sql Script related configurations. - * @type \Google\Cloud\Dataplex\V1\Content\Notebook $notebook - * Notebook related configurations. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Analyze::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The relative resource name of the content, of the form: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The relative resource name of the content, of the form: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. System generated globally unique ID for the content. This ID - * will be different if the content is deleted and re-created with the same - * name. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. System generated globally unique ID for the content. This ID - * will be different if the content is deleted and re-created with the same - * name. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - - /** - * Required. The path for the Content file, represented as directory - * structure. Unique within a lake. Limited to alphanumerics, hyphens, - * underscores, dots and slashes. - * - * Generated from protobuf field string path = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getPath() - { - return $this->path; - } - - /** - * Required. The path for the Content file, represented as directory - * structure. Unique within a lake. Limited to alphanumerics, hyphens, - * underscores, dots and slashes. - * - * Generated from protobuf field string path = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setPath($var) - { - GPBUtil::checkString($var, True); - $this->path = $var; - - return $this; - } - - /** - * Output only. Content creation time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. Content creation time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The time when the content was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The time when the content was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Optional. User defined labels for the content. - * - * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. User defined labels for the content. - * - * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Optional. Description of the content. - * - * Generated from protobuf field string description = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. Description of the content. - * - * Generated from protobuf field string description = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Required. Content data in string format. - * - * Generated from protobuf field string data_text = 9 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDataText() - { - return $this->readOneof(9); - } - - public function hasDataText() - { - return $this->hasOneof(9); - } - - /** - * Required. Content data in string format. - * - * Generated from protobuf field string data_text = 9 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDataText($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(9, $var); - - return $this; - } - - /** - * Sql Script related configurations. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Content.SqlScript sql_script = 100; - * @return \Google\Cloud\Dataplex\V1\Content\SqlScript|null - */ - public function getSqlScript() - { - return $this->readOneof(100); - } - - public function hasSqlScript() - { - return $this->hasOneof(100); - } - - /** - * Sql Script related configurations. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Content.SqlScript sql_script = 100; - * @param \Google\Cloud\Dataplex\V1\Content\SqlScript $var - * @return $this - */ - public function setSqlScript($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Content\SqlScript::class); - $this->writeOneof(100, $var); - - return $this; - } - - /** - * Notebook related configurations. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Content.Notebook notebook = 101; - * @return \Google\Cloud\Dataplex\V1\Content\Notebook|null - */ - public function getNotebook() - { - return $this->readOneof(101); - } - - public function hasNotebook() - { - return $this->hasOneof(101); - } - - /** - * Notebook related configurations. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Content.Notebook notebook = 101; - * @param \Google\Cloud\Dataplex\V1\Content\Notebook $var - * @return $this - */ - public function setNotebook($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Content\Notebook::class); - $this->writeOneof(101, $var); - - return $this; - } - - /** - * @return string - */ - public function getData() - { - return $this->whichOneof("data"); - } - - /** - * @return string - */ - public function getContent() - { - return $this->whichOneof("content"); - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Content/Notebook.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Content/Notebook.php deleted file mode 100644 index cca8345c3c8f..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Content/Notebook.php +++ /dev/null @@ -1,70 +0,0 @@ -google.cloud.dataplex.v1.Content.Notebook - */ -class Notebook extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Kernel Type of the notebook. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Content.Notebook.KernelType kernel_type = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $kernel_type = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $kernel_type - * Required. Kernel Type of the notebook. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Analyze::initOnce(); - parent::__construct($data); - } - - /** - * Required. Kernel Type of the notebook. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Content.Notebook.KernelType kernel_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getKernelType() - { - return $this->kernel_type; - } - - /** - * Required. Kernel Type of the notebook. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Content.Notebook.KernelType kernel_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setKernelType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\Content\Notebook\KernelType::class); - $this->kernel_type = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Notebook::class, \Google\Cloud\Dataplex\V1\Content_Notebook::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Content/Notebook/KernelType.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Content/Notebook/KernelType.php deleted file mode 100644 index a33a77e1cf4e..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Content/Notebook/KernelType.php +++ /dev/null @@ -1,57 +0,0 @@ -google.cloud.dataplex.v1.Content.Notebook.KernelType - */ -class KernelType -{ - /** - * Kernel Type unspecified. - * - * Generated from protobuf enum KERNEL_TYPE_UNSPECIFIED = 0; - */ - const KERNEL_TYPE_UNSPECIFIED = 0; - /** - * Python 3 Kernel. - * - * Generated from protobuf enum PYTHON3 = 1; - */ - const PYTHON3 = 1; - - private static $valueToName = [ - self::KERNEL_TYPE_UNSPECIFIED => 'KERNEL_TYPE_UNSPECIFIED', - self::PYTHON3 => 'PYTHON3', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(KernelType::class, \Google\Cloud\Dataplex\V1\Content_Notebook_KernelType::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Content/SqlScript.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Content/SqlScript.php deleted file mode 100644 index 89b5cc41b9be..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Content/SqlScript.php +++ /dev/null @@ -1,70 +0,0 @@ -google.cloud.dataplex.v1.Content.SqlScript - */ -class SqlScript extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Query Engine to be used for the Sql Query. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Content.SqlScript.QueryEngine engine = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $engine = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $engine - * Required. Query Engine to be used for the Sql Query. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Analyze::initOnce(); - parent::__construct($data); - } - - /** - * Required. Query Engine to be used for the Sql Query. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Content.SqlScript.QueryEngine engine = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getEngine() - { - return $this->engine; - } - - /** - * Required. Query Engine to be used for the Sql Query. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Content.SqlScript.QueryEngine engine = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setEngine($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\Content\SqlScript\QueryEngine::class); - $this->engine = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SqlScript::class, \Google\Cloud\Dataplex\V1\Content_SqlScript::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Content/SqlScript/QueryEngine.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Content/SqlScript/QueryEngine.php deleted file mode 100644 index fbc494c2393d..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Content/SqlScript/QueryEngine.php +++ /dev/null @@ -1,57 +0,0 @@ -google.cloud.dataplex.v1.Content.SqlScript.QueryEngine - */ -class QueryEngine -{ - /** - * Value was unspecified. - * - * Generated from protobuf enum QUERY_ENGINE_UNSPECIFIED = 0; - */ - const QUERY_ENGINE_UNSPECIFIED = 0; - /** - * Spark SQL Query. - * - * Generated from protobuf enum SPARK = 2; - */ - const SPARK = 2; - - private static $valueToName = [ - self::QUERY_ENGINE_UNSPECIFIED => 'QUERY_ENGINE_UNSPECIFIED', - self::SPARK => 'SPARK', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(QueryEngine::class, \Google\Cloud\Dataplex\V1\Content_SqlScript_QueryEngine::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateAspectTypeRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateAspectTypeRequest.php deleted file mode 100644 index 265c62c444db..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateAspectTypeRequest.php +++ /dev/null @@ -1,211 +0,0 @@ -google.cloud.dataplex.v1.CreateAspectTypeRequest - */ -class CreateAspectTypeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the AspectType, of the form: - * projects/{project_number}/locations/{location_id} - * where `location_id` refers to a GCP region. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. AspectType identifier. - * - * Generated from protobuf field string aspect_type_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $aspect_type_id = ''; - /** - * Required. AspectType Resource - * - * Generated from protobuf field .google.cloud.dataplex.v1.AspectType aspect_type = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $aspect_type = null; - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validate_only = false; - - /** - * @param string $parent Required. The resource name of the AspectType, of the form: - * projects/{project_number}/locations/{location_id} - * where `location_id` refers to a GCP region. Please see - * {@see CatalogServiceClient::locationName()} for help formatting this field. - * @param \Google\Cloud\Dataplex\V1\AspectType $aspectType Required. AspectType Resource - * @param string $aspectTypeId Required. AspectType identifier. - * - * @return \Google\Cloud\Dataplex\V1\CreateAspectTypeRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Dataplex\V1\AspectType $aspectType, string $aspectTypeId): self - { - return (new self()) - ->setParent($parent) - ->setAspectType($aspectType) - ->setAspectTypeId($aspectTypeId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the AspectType, of the form: - * projects/{project_number}/locations/{location_id} - * where `location_id` refers to a GCP region. - * @type string $aspect_type_id - * Required. AspectType identifier. - * @type \Google\Cloud\Dataplex\V1\AspectType $aspect_type - * Required. AspectType Resource - * @type bool $validate_only - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Catalog::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the AspectType, of the form: - * projects/{project_number}/locations/{location_id} - * where `location_id` refers to a GCP region. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The resource name of the AspectType, of the form: - * projects/{project_number}/locations/{location_id} - * where `location_id` refers to a GCP region. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. AspectType identifier. - * - * Generated from protobuf field string aspect_type_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getAspectTypeId() - { - return $this->aspect_type_id; - } - - /** - * Required. AspectType identifier. - * - * Generated from protobuf field string aspect_type_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setAspectTypeId($var) - { - GPBUtil::checkString($var, True); - $this->aspect_type_id = $var; - - return $this; - } - - /** - * Required. AspectType Resource - * - * Generated from protobuf field .google.cloud.dataplex.v1.AspectType aspect_type = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataplex\V1\AspectType|null - */ - public function getAspectType() - { - return $this->aspect_type; - } - - public function hasAspectType() - { - return isset($this->aspect_type); - } - - public function clearAspectType() - { - unset($this->aspect_type); - } - - /** - * Required. AspectType Resource - * - * Generated from protobuf field .google.cloud.dataplex.v1.AspectType aspect_type = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataplex\V1\AspectType $var - * @return $this - */ - public function setAspectType($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\AspectType::class); - $this->aspect_type = $var; - - return $this; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateAssetRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateAssetRequest.php deleted file mode 100644 index 7738558c8804..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateAssetRequest.php +++ /dev/null @@ -1,241 +0,0 @@ -google.cloud.dataplex.v1.CreateAssetRequest - */ -class CreateAssetRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Asset identifier. - * This ID will be used to generate names such as table names when publishing - * metadata to Hive Metastore and BigQuery. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must end with a number or a letter. - * * Must be between 1-63 characters. - * * Must be unique within the zone. - * - * Generated from protobuf field string asset_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $asset_id = ''; - /** - * Required. Asset resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Asset asset = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $asset = null; - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validate_only = false; - - /** - * @param string $parent Required. The resource name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. Please see - * {@see DataplexServiceClient::zoneName()} for help formatting this field. - * @param \Google\Cloud\Dataplex\V1\Asset $asset Required. Asset resource. - * @param string $assetId Required. Asset identifier. - * This ID will be used to generate names such as table names when publishing - * metadata to Hive Metastore and BigQuery. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must end with a number or a letter. - * * Must be between 1-63 characters. - * * Must be unique within the zone. - * - * @return \Google\Cloud\Dataplex\V1\CreateAssetRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Dataplex\V1\Asset $asset, string $assetId): self - { - return (new self()) - ->setParent($parent) - ->setAsset($asset) - ->setAssetId($assetId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * @type string $asset_id - * Required. Asset identifier. - * This ID will be used to generate names such as table names when publishing - * metadata to Hive Metastore and BigQuery. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must end with a number or a letter. - * * Must be between 1-63 characters. - * * Must be unique within the zone. - * @type \Google\Cloud\Dataplex\V1\Asset $asset - * Required. Asset resource. - * @type bool $validate_only - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The resource name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. Asset identifier. - * This ID will be used to generate names such as table names when publishing - * metadata to Hive Metastore and BigQuery. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must end with a number or a letter. - * * Must be between 1-63 characters. - * * Must be unique within the zone. - * - * Generated from protobuf field string asset_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getAssetId() - { - return $this->asset_id; - } - - /** - * Required. Asset identifier. - * This ID will be used to generate names such as table names when publishing - * metadata to Hive Metastore and BigQuery. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must end with a number or a letter. - * * Must be between 1-63 characters. - * * Must be unique within the zone. - * - * Generated from protobuf field string asset_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setAssetId($var) - { - GPBUtil::checkString($var, True); - $this->asset_id = $var; - - return $this; - } - - /** - * Required. Asset resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Asset asset = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataplex\V1\Asset|null - */ - public function getAsset() - { - return $this->asset; - } - - public function hasAsset() - { - return isset($this->asset); - } - - public function clearAsset() - { - unset($this->asset); - } - - /** - * Required. Asset resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Asset asset = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataplex\V1\Asset $var - * @return $this - */ - public function setAsset($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Asset::class); - $this->asset = $var; - - return $this; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateContentRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateContentRequest.php deleted file mode 100644 index b9f40119a99d..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateContentRequest.php +++ /dev/null @@ -1,170 +0,0 @@ -google.cloud.dataplex.v1.CreateContentRequest - */ -class CreateContentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the parent lake: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id} - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Content resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Content content = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $content = null; - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validate_only = false; - - /** - * @param string $parent Required. The resource name of the parent lake: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id} - * Please see {@see ContentServiceClient::lakeName()} for help formatting this field. - * @param \Google\Cloud\Dataplex\V1\Content $content Required. Content resource. - * - * @return \Google\Cloud\Dataplex\V1\CreateContentRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Dataplex\V1\Content $content): self - { - return (new self()) - ->setParent($parent) - ->setContent($content); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the parent lake: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id} - * @type \Google\Cloud\Dataplex\V1\Content $content - * Required. Content resource. - * @type bool $validate_only - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Content::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the parent lake: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id} - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The resource name of the parent lake: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id} - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. Content resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Content content = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataplex\V1\Content|null - */ - public function getContent() - { - return $this->content; - } - - public function hasContent() - { - return isset($this->content); - } - - public function clearContent() - { - unset($this->content); - } - - /** - * Required. Content resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Content content = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataplex\V1\Content $var - * @return $this - */ - public function setContent($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Content::class); - $this->content = $var; - - return $this; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateDataAttributeBindingRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateDataAttributeBindingRequest.php deleted file mode 100644 index 02408fcac3c9..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateDataAttributeBindingRequest.php +++ /dev/null @@ -1,231 +0,0 @@ -google.cloud.dataplex.v1.CreateDataAttributeBindingRequest - */ -class CreateDataAttributeBindingRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the parent data taxonomy - * projects/{project_number}/locations/{location_id} - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. DataAttributeBinding identifier. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * * Must be unique within the Location. - * - * Generated from protobuf field string data_attribute_binding_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $data_attribute_binding_id = ''; - /** - * Required. DataAttributeBinding resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataAttributeBinding data_attribute_binding = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $data_attribute_binding = null; - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validate_only = false; - - /** - * @param string $parent Required. The resource name of the parent data taxonomy - * projects/{project_number}/locations/{location_id} - * Please see {@see DataTaxonomyServiceClient::locationName()} for help formatting this field. - * @param \Google\Cloud\Dataplex\V1\DataAttributeBinding $dataAttributeBinding Required. DataAttributeBinding resource. - * @param string $dataAttributeBindingId Required. DataAttributeBinding identifier. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * * Must be unique within the Location. - * - * @return \Google\Cloud\Dataplex\V1\CreateDataAttributeBindingRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Dataplex\V1\DataAttributeBinding $dataAttributeBinding, string $dataAttributeBindingId): self - { - return (new self()) - ->setParent($parent) - ->setDataAttributeBinding($dataAttributeBinding) - ->setDataAttributeBindingId($dataAttributeBindingId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the parent data taxonomy - * projects/{project_number}/locations/{location_id} - * @type string $data_attribute_binding_id - * Required. DataAttributeBinding identifier. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * * Must be unique within the Location. - * @type \Google\Cloud\Dataplex\V1\DataAttributeBinding $data_attribute_binding - * Required. DataAttributeBinding resource. - * @type bool $validate_only - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataTaxonomy::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the parent data taxonomy - * projects/{project_number}/locations/{location_id} - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The resource name of the parent data taxonomy - * projects/{project_number}/locations/{location_id} - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. DataAttributeBinding identifier. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * * Must be unique within the Location. - * - * Generated from protobuf field string data_attribute_binding_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDataAttributeBindingId() - { - return $this->data_attribute_binding_id; - } - - /** - * Required. DataAttributeBinding identifier. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * * Must be unique within the Location. - * - * Generated from protobuf field string data_attribute_binding_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDataAttributeBindingId($var) - { - GPBUtil::checkString($var, True); - $this->data_attribute_binding_id = $var; - - return $this; - } - - /** - * Required. DataAttributeBinding resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataAttributeBinding data_attribute_binding = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataplex\V1\DataAttributeBinding|null - */ - public function getDataAttributeBinding() - { - return $this->data_attribute_binding; - } - - public function hasDataAttributeBinding() - { - return isset($this->data_attribute_binding); - } - - public function clearDataAttributeBinding() - { - unset($this->data_attribute_binding); - } - - /** - * Required. DataAttributeBinding resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataAttributeBinding data_attribute_binding = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataplex\V1\DataAttributeBinding $var - * @return $this - */ - public function setDataAttributeBinding($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataAttributeBinding::class); - $this->data_attribute_binding = $var; - - return $this; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateDataAttributeRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateDataAttributeRequest.php deleted file mode 100644 index 62977dd678c9..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateDataAttributeRequest.php +++ /dev/null @@ -1,231 +0,0 @@ -google.cloud.dataplex.v1.CreateDataAttributeRequest - */ -class CreateDataAttributeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the parent data taxonomy - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. DataAttribute identifier. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * * Must be unique within the DataTaxonomy. - * - * Generated from protobuf field string data_attribute_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $data_attribute_id = ''; - /** - * Required. DataAttribute resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataAttribute data_attribute = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $data_attribute = null; - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validate_only = false; - - /** - * @param string $parent Required. The resource name of the parent data taxonomy - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} - * Please see {@see DataTaxonomyServiceClient::dataTaxonomyName()} for help formatting this field. - * @param \Google\Cloud\Dataplex\V1\DataAttribute $dataAttribute Required. DataAttribute resource. - * @param string $dataAttributeId Required. DataAttribute identifier. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * * Must be unique within the DataTaxonomy. - * - * @return \Google\Cloud\Dataplex\V1\CreateDataAttributeRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Dataplex\V1\DataAttribute $dataAttribute, string $dataAttributeId): self - { - return (new self()) - ->setParent($parent) - ->setDataAttribute($dataAttribute) - ->setDataAttributeId($dataAttributeId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the parent data taxonomy - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} - * @type string $data_attribute_id - * Required. DataAttribute identifier. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * * Must be unique within the DataTaxonomy. - * @type \Google\Cloud\Dataplex\V1\DataAttribute $data_attribute - * Required. DataAttribute resource. - * @type bool $validate_only - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataTaxonomy::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the parent data taxonomy - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The resource name of the parent data taxonomy - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. DataAttribute identifier. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * * Must be unique within the DataTaxonomy. - * - * Generated from protobuf field string data_attribute_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDataAttributeId() - { - return $this->data_attribute_id; - } - - /** - * Required. DataAttribute identifier. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * * Must be unique within the DataTaxonomy. - * - * Generated from protobuf field string data_attribute_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDataAttributeId($var) - { - GPBUtil::checkString($var, True); - $this->data_attribute_id = $var; - - return $this; - } - - /** - * Required. DataAttribute resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataAttribute data_attribute = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataplex\V1\DataAttribute|null - */ - public function getDataAttribute() - { - return $this->data_attribute; - } - - public function hasDataAttribute() - { - return isset($this->data_attribute); - } - - public function clearDataAttribute() - { - unset($this->data_attribute); - } - - /** - * Required. DataAttribute resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataAttribute data_attribute = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataplex\V1\DataAttribute $var - * @return $this - */ - public function setDataAttribute($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataAttribute::class); - $this->data_attribute = $var; - - return $this; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateDataScanRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateDataScanRequest.php deleted file mode 100644 index ff546cc358c2..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateDataScanRequest.php +++ /dev/null @@ -1,242 +0,0 @@ -google.cloud.dataplex.v1.CreateDataScanRequest - */ -class CreateDataScanRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the parent location: - * `projects/{project}/locations/{location_id}` - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. DataScan resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScan data_scan = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $data_scan = null; - /** - * Required. DataScan identifier. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must end with a number or a letter. - * * Must be between 1-63 characters. - * * Must be unique within the customer project / location. - * - * Generated from protobuf field string data_scan_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $data_scan_id = ''; - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is `false`. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validate_only = false; - - /** - * @param string $parent Required. The resource name of the parent location: - * `projects/{project}/locations/{location_id}` - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. Please see - * {@see DataScanServiceClient::locationName()} for help formatting this field. - * @param \Google\Cloud\Dataplex\V1\DataScan $dataScan Required. DataScan resource. - * @param string $dataScanId Required. DataScan identifier. - * - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must end with a number or a letter. - * * Must be between 1-63 characters. - * * Must be unique within the customer project / location. - * - * @return \Google\Cloud\Dataplex\V1\CreateDataScanRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Dataplex\V1\DataScan $dataScan, string $dataScanId): self - { - return (new self()) - ->setParent($parent) - ->setDataScan($dataScan) - ->setDataScanId($dataScanId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the parent location: - * `projects/{project}/locations/{location_id}` - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * @type \Google\Cloud\Dataplex\V1\DataScan $data_scan - * Required. DataScan resource. - * @type string $data_scan_id - * Required. DataScan identifier. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must end with a number or a letter. - * * Must be between 1-63 characters. - * * Must be unique within the customer project / location. - * @type bool $validate_only - * Optional. Only validate the request, but do not perform mutations. - * The default is `false`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Datascans::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the parent location: - * `projects/{project}/locations/{location_id}` - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The resource name of the parent location: - * `projects/{project}/locations/{location_id}` - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. DataScan resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScan data_scan = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataplex\V1\DataScan|null - */ - public function getDataScan() - { - return $this->data_scan; - } - - public function hasDataScan() - { - return isset($this->data_scan); - } - - public function clearDataScan() - { - unset($this->data_scan); - } - - /** - * Required. DataScan resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScan data_scan = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataplex\V1\DataScan $var - * @return $this - */ - public function setDataScan($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataScan::class); - $this->data_scan = $var; - - return $this; - } - - /** - * Required. DataScan identifier. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must end with a number or a letter. - * * Must be between 1-63 characters. - * * Must be unique within the customer project / location. - * - * Generated from protobuf field string data_scan_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDataScanId() - { - return $this->data_scan_id; - } - - /** - * Required. DataScan identifier. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must end with a number or a letter. - * * Must be between 1-63 characters. - * * Must be unique within the customer project / location. - * - * Generated from protobuf field string data_scan_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDataScanId($var) - { - GPBUtil::checkString($var, True); - $this->data_scan_id = $var; - - return $this; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is `false`. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is `false`. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateDataTaxonomyRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateDataTaxonomyRequest.php deleted file mode 100644 index 6576b106053c..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateDataTaxonomyRequest.php +++ /dev/null @@ -1,236 +0,0 @@ -google.cloud.dataplex.v1.CreateDataTaxonomyRequest - */ -class CreateDataTaxonomyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the data taxonomy location, of the form: - * projects/{project_number}/locations/{location_id} - * where `location_id` refers to a GCP region. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. DataTaxonomy identifier. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * * Must be unique within the Project. - * - * Generated from protobuf field string data_taxonomy_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $data_taxonomy_id = ''; - /** - * Required. DataTaxonomy resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataTaxonomy data_taxonomy = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $data_taxonomy = null; - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validate_only = false; - - /** - * @param string $parent Required. The resource name of the data taxonomy location, of the form: - * projects/{project_number}/locations/{location_id} - * where `location_id` refers to a GCP region. Please see - * {@see DataTaxonomyServiceClient::locationName()} for help formatting this field. - * @param \Google\Cloud\Dataplex\V1\DataTaxonomy $dataTaxonomy Required. DataTaxonomy resource. - * @param string $dataTaxonomyId Required. DataTaxonomy identifier. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * * Must be unique within the Project. - * - * @return \Google\Cloud\Dataplex\V1\CreateDataTaxonomyRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Dataplex\V1\DataTaxonomy $dataTaxonomy, string $dataTaxonomyId): self - { - return (new self()) - ->setParent($parent) - ->setDataTaxonomy($dataTaxonomy) - ->setDataTaxonomyId($dataTaxonomyId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the data taxonomy location, of the form: - * projects/{project_number}/locations/{location_id} - * where `location_id` refers to a GCP region. - * @type string $data_taxonomy_id - * Required. DataTaxonomy identifier. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * * Must be unique within the Project. - * @type \Google\Cloud\Dataplex\V1\DataTaxonomy $data_taxonomy - * Required. DataTaxonomy resource. - * @type bool $validate_only - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataTaxonomy::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the data taxonomy location, of the form: - * projects/{project_number}/locations/{location_id} - * where `location_id` refers to a GCP region. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The resource name of the data taxonomy location, of the form: - * projects/{project_number}/locations/{location_id} - * where `location_id` refers to a GCP region. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. DataTaxonomy identifier. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * * Must be unique within the Project. - * - * Generated from protobuf field string data_taxonomy_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDataTaxonomyId() - { - return $this->data_taxonomy_id; - } - - /** - * Required. DataTaxonomy identifier. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * * Must be unique within the Project. - * - * Generated from protobuf field string data_taxonomy_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDataTaxonomyId($var) - { - GPBUtil::checkString($var, True); - $this->data_taxonomy_id = $var; - - return $this; - } - - /** - * Required. DataTaxonomy resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataTaxonomy data_taxonomy = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataplex\V1\DataTaxonomy|null - */ - public function getDataTaxonomy() - { - return $this->data_taxonomy; - } - - public function hasDataTaxonomy() - { - return isset($this->data_taxonomy); - } - - public function clearDataTaxonomy() - { - unset($this->data_taxonomy); - } - - /** - * Required. DataTaxonomy resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataTaxonomy data_taxonomy = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataplex\V1\DataTaxonomy $var - * @return $this - */ - public function setDataTaxonomy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataTaxonomy::class); - $this->data_taxonomy = $var; - - return $this; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateEntityRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateEntityRequest.php deleted file mode 100644 index a20402edd79a..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateEntityRequest.php +++ /dev/null @@ -1,170 +0,0 @@ -google.cloud.dataplex.v1.CreateEntityRequest - */ -class CreateEntityRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Entity resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Entity entity = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $entity = null; - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validate_only = false; - - /** - * @param string $parent Required. The resource name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. Please see - * {@see MetadataServiceClient::zoneName()} for help formatting this field. - * @param \Google\Cloud\Dataplex\V1\Entity $entity Required. Entity resource. - * - * @return \Google\Cloud\Dataplex\V1\CreateEntityRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Dataplex\V1\Entity $entity): self - { - return (new self()) - ->setParent($parent) - ->setEntity($entity); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * @type \Google\Cloud\Dataplex\V1\Entity $entity - * Required. Entity resource. - * @type bool $validate_only - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Metadata::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The resource name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. Entity resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Entity entity = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataplex\V1\Entity|null - */ - public function getEntity() - { - return $this->entity; - } - - public function hasEntity() - { - return isset($this->entity); - } - - public function clearEntity() - { - unset($this->entity); - } - - /** - * Required. Entity resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Entity entity = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataplex\V1\Entity $var - * @return $this - */ - public function setEntity($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Entity::class); - $this->entity = $var; - - return $this; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateEntryGroupRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateEntryGroupRequest.php deleted file mode 100644 index ddda7b08816b..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateEntryGroupRequest.php +++ /dev/null @@ -1,211 +0,0 @@ -google.cloud.dataplex.v1.CreateEntryGroupRequest - */ -class CreateEntryGroupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the entryGroup, of the form: - * projects/{project_number}/locations/{location_id} - * where `location_id` refers to a GCP region. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. EntryGroup identifier. - * - * Generated from protobuf field string entry_group_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $entry_group_id = ''; - /** - * Required. EntryGroup Resource - * - * Generated from protobuf field .google.cloud.dataplex.v1.EntryGroup entry_group = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $entry_group = null; - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validate_only = false; - - /** - * @param string $parent Required. The resource name of the entryGroup, of the form: - * projects/{project_number}/locations/{location_id} - * where `location_id` refers to a GCP region. Please see - * {@see CatalogServiceClient::locationName()} for help formatting this field. - * @param \Google\Cloud\Dataplex\V1\EntryGroup $entryGroup Required. EntryGroup Resource - * @param string $entryGroupId Required. EntryGroup identifier. - * - * @return \Google\Cloud\Dataplex\V1\CreateEntryGroupRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Dataplex\V1\EntryGroup $entryGroup, string $entryGroupId): self - { - return (new self()) - ->setParent($parent) - ->setEntryGroup($entryGroup) - ->setEntryGroupId($entryGroupId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the entryGroup, of the form: - * projects/{project_number}/locations/{location_id} - * where `location_id` refers to a GCP region. - * @type string $entry_group_id - * Required. EntryGroup identifier. - * @type \Google\Cloud\Dataplex\V1\EntryGroup $entry_group - * Required. EntryGroup Resource - * @type bool $validate_only - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Catalog::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the entryGroup, of the form: - * projects/{project_number}/locations/{location_id} - * where `location_id` refers to a GCP region. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The resource name of the entryGroup, of the form: - * projects/{project_number}/locations/{location_id} - * where `location_id` refers to a GCP region. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. EntryGroup identifier. - * - * Generated from protobuf field string entry_group_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getEntryGroupId() - { - return $this->entry_group_id; - } - - /** - * Required. EntryGroup identifier. - * - * Generated from protobuf field string entry_group_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setEntryGroupId($var) - { - GPBUtil::checkString($var, True); - $this->entry_group_id = $var; - - return $this; - } - - /** - * Required. EntryGroup Resource - * - * Generated from protobuf field .google.cloud.dataplex.v1.EntryGroup entry_group = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataplex\V1\EntryGroup|null - */ - public function getEntryGroup() - { - return $this->entry_group; - } - - public function hasEntryGroup() - { - return isset($this->entry_group); - } - - public function clearEntryGroup() - { - unset($this->entry_group); - } - - /** - * Required. EntryGroup Resource - * - * Generated from protobuf field .google.cloud.dataplex.v1.EntryGroup entry_group = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataplex\V1\EntryGroup $var - * @return $this - */ - public function setEntryGroup($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\EntryGroup::class); - $this->entry_group = $var; - - return $this; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateEntryRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateEntryRequest.php deleted file mode 100644 index 0d76b839f4bd..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateEntryRequest.php +++ /dev/null @@ -1,240 +0,0 @@ -google.cloud.dataplex.v1.CreateEntryRequest - */ -class CreateEntryRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the parent Entry Group: - * `projects/{project}/locations/{location}/entryGroups/{entry_group}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Entry identifier. It has to be unique within an Entry Group. - * Entries corresponding to Google Cloud resources use Entry ID format based - * on Full Resource Names - * (https://cloud.google.com/apis/design/resource_names#full_resource_name). - * The format is a Full Resource Name of the resource without the - * prefix double slashes in the API Service Name part of Full Resource Name. - * This allows retrieval of entries using their associated resource name. - * For example if the Full Resource Name of a resource is - * `//library.googleapis.com/shelves/shelf1/books/book2`, - * then the suggested entry_id is - * `library.googleapis.com/shelves/shelf1/books/book2`. - * It is also suggested to follow the same convention for entries - * corresponding to resources from other providers or systems than Google - * Cloud. - * The maximum size of the field is 4000 characters. - * - * Generated from protobuf field string entry_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $entry_id = ''; - /** - * Required. Entry resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Entry entry = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $entry = null; - - /** - * @param string $parent Required. The resource name of the parent Entry Group: - * `projects/{project}/locations/{location}/entryGroups/{entry_group}`. Please see - * {@see CatalogServiceClient::entryGroupName()} for help formatting this field. - * @param \Google\Cloud\Dataplex\V1\Entry $entry Required. Entry resource. - * @param string $entryId Required. Entry identifier. It has to be unique within an Entry Group. - * - * Entries corresponding to Google Cloud resources use Entry ID format based - * on Full Resource Names - * (https://cloud.google.com/apis/design/resource_names#full_resource_name). - * The format is a Full Resource Name of the resource without the - * prefix double slashes in the API Service Name part of Full Resource Name. - * This allows retrieval of entries using their associated resource name. - * - * For example if the Full Resource Name of a resource is - * `//library.googleapis.com/shelves/shelf1/books/book2`, - * then the suggested entry_id is - * `library.googleapis.com/shelves/shelf1/books/book2`. - * - * It is also suggested to follow the same convention for entries - * corresponding to resources from other providers or systems than Google - * Cloud. - * - * The maximum size of the field is 4000 characters. - * - * @return \Google\Cloud\Dataplex\V1\CreateEntryRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Dataplex\V1\Entry $entry, string $entryId): self - { - return (new self()) - ->setParent($parent) - ->setEntry($entry) - ->setEntryId($entryId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the parent Entry Group: - * `projects/{project}/locations/{location}/entryGroups/{entry_group}`. - * @type string $entry_id - * Required. Entry identifier. It has to be unique within an Entry Group. - * Entries corresponding to Google Cloud resources use Entry ID format based - * on Full Resource Names - * (https://cloud.google.com/apis/design/resource_names#full_resource_name). - * The format is a Full Resource Name of the resource without the - * prefix double slashes in the API Service Name part of Full Resource Name. - * This allows retrieval of entries using their associated resource name. - * For example if the Full Resource Name of a resource is - * `//library.googleapis.com/shelves/shelf1/books/book2`, - * then the suggested entry_id is - * `library.googleapis.com/shelves/shelf1/books/book2`. - * It is also suggested to follow the same convention for entries - * corresponding to resources from other providers or systems than Google - * Cloud. - * The maximum size of the field is 4000 characters. - * @type \Google\Cloud\Dataplex\V1\Entry $entry - * Required. Entry resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Catalog::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the parent Entry Group: - * `projects/{project}/locations/{location}/entryGroups/{entry_group}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The resource name of the parent Entry Group: - * `projects/{project}/locations/{location}/entryGroups/{entry_group}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. Entry identifier. It has to be unique within an Entry Group. - * Entries corresponding to Google Cloud resources use Entry ID format based - * on Full Resource Names - * (https://cloud.google.com/apis/design/resource_names#full_resource_name). - * The format is a Full Resource Name of the resource without the - * prefix double slashes in the API Service Name part of Full Resource Name. - * This allows retrieval of entries using their associated resource name. - * For example if the Full Resource Name of a resource is - * `//library.googleapis.com/shelves/shelf1/books/book2`, - * then the suggested entry_id is - * `library.googleapis.com/shelves/shelf1/books/book2`. - * It is also suggested to follow the same convention for entries - * corresponding to resources from other providers or systems than Google - * Cloud. - * The maximum size of the field is 4000 characters. - * - * Generated from protobuf field string entry_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getEntryId() - { - return $this->entry_id; - } - - /** - * Required. Entry identifier. It has to be unique within an Entry Group. - * Entries corresponding to Google Cloud resources use Entry ID format based - * on Full Resource Names - * (https://cloud.google.com/apis/design/resource_names#full_resource_name). - * The format is a Full Resource Name of the resource without the - * prefix double slashes in the API Service Name part of Full Resource Name. - * This allows retrieval of entries using their associated resource name. - * For example if the Full Resource Name of a resource is - * `//library.googleapis.com/shelves/shelf1/books/book2`, - * then the suggested entry_id is - * `library.googleapis.com/shelves/shelf1/books/book2`. - * It is also suggested to follow the same convention for entries - * corresponding to resources from other providers or systems than Google - * Cloud. - * The maximum size of the field is 4000 characters. - * - * Generated from protobuf field string entry_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setEntryId($var) - { - GPBUtil::checkString($var, True); - $this->entry_id = $var; - - return $this; - } - - /** - * Required. Entry resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Entry entry = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataplex\V1\Entry|null - */ - public function getEntry() - { - return $this->entry; - } - - public function hasEntry() - { - return isset($this->entry); - } - - public function clearEntry() - { - unset($this->entry); - } - - /** - * Required. Entry resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Entry entry = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataplex\V1\Entry $var - * @return $this - */ - public function setEntry($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Entry::class); - $this->entry = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateEntryTypeRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateEntryTypeRequest.php deleted file mode 100644 index 86b2c2c7f620..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateEntryTypeRequest.php +++ /dev/null @@ -1,211 +0,0 @@ -google.cloud.dataplex.v1.CreateEntryTypeRequest - */ -class CreateEntryTypeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the EntryType, of the form: - * projects/{project_number}/locations/{location_id} - * where `location_id` refers to a GCP region. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. EntryType identifier. - * - * Generated from protobuf field string entry_type_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $entry_type_id = ''; - /** - * Required. EntryType Resource - * - * Generated from protobuf field .google.cloud.dataplex.v1.EntryType entry_type = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $entry_type = null; - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validate_only = false; - - /** - * @param string $parent Required. The resource name of the EntryType, of the form: - * projects/{project_number}/locations/{location_id} - * where `location_id` refers to a GCP region. Please see - * {@see CatalogServiceClient::locationName()} for help formatting this field. - * @param \Google\Cloud\Dataplex\V1\EntryType $entryType Required. EntryType Resource - * @param string $entryTypeId Required. EntryType identifier. - * - * @return \Google\Cloud\Dataplex\V1\CreateEntryTypeRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Dataplex\V1\EntryType $entryType, string $entryTypeId): self - { - return (new self()) - ->setParent($parent) - ->setEntryType($entryType) - ->setEntryTypeId($entryTypeId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the EntryType, of the form: - * projects/{project_number}/locations/{location_id} - * where `location_id` refers to a GCP region. - * @type string $entry_type_id - * Required. EntryType identifier. - * @type \Google\Cloud\Dataplex\V1\EntryType $entry_type - * Required. EntryType Resource - * @type bool $validate_only - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Catalog::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the EntryType, of the form: - * projects/{project_number}/locations/{location_id} - * where `location_id` refers to a GCP region. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The resource name of the EntryType, of the form: - * projects/{project_number}/locations/{location_id} - * where `location_id` refers to a GCP region. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. EntryType identifier. - * - * Generated from protobuf field string entry_type_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getEntryTypeId() - { - return $this->entry_type_id; - } - - /** - * Required. EntryType identifier. - * - * Generated from protobuf field string entry_type_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setEntryTypeId($var) - { - GPBUtil::checkString($var, True); - $this->entry_type_id = $var; - - return $this; - } - - /** - * Required. EntryType Resource - * - * Generated from protobuf field .google.cloud.dataplex.v1.EntryType entry_type = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataplex\V1\EntryType|null - */ - public function getEntryType() - { - return $this->entry_type; - } - - public function hasEntryType() - { - return isset($this->entry_type); - } - - public function clearEntryType() - { - unset($this->entry_type); - } - - /** - * Required. EntryType Resource - * - * Generated from protobuf field .google.cloud.dataplex.v1.EntryType entry_type = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataplex\V1\EntryType $var - * @return $this - */ - public function setEntryType($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\EntryType::class); - $this->entry_type = $var; - - return $this; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateEnvironmentRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateEnvironmentRequest.php deleted file mode 100644 index 9c62503fb5e7..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateEnvironmentRequest.php +++ /dev/null @@ -1,231 +0,0 @@ -google.cloud.dataplex.v1.CreateEnvironmentRequest - */ -class CreateEnvironmentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the parent lake: - * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Environment identifier. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * * Must be unique within the lake. - * - * Generated from protobuf field string environment_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $environment_id = ''; - /** - * Required. Environment resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Environment environment = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $environment = null; - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validate_only = false; - - /** - * @param string $parent Required. The resource name of the parent lake: - * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`. Please see - * {@see DataplexServiceClient::lakeName()} for help formatting this field. - * @param \Google\Cloud\Dataplex\V1\Environment $environment Required. Environment resource. - * @param string $environmentId Required. Environment identifier. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * * Must be unique within the lake. - * - * @return \Google\Cloud\Dataplex\V1\CreateEnvironmentRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Dataplex\V1\Environment $environment, string $environmentId): self - { - return (new self()) - ->setParent($parent) - ->setEnvironment($environment) - ->setEnvironmentId($environmentId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the parent lake: - * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`. - * @type string $environment_id - * Required. Environment identifier. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * * Must be unique within the lake. - * @type \Google\Cloud\Dataplex\V1\Environment $environment - * Required. Environment resource. - * @type bool $validate_only - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the parent lake: - * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The resource name of the parent lake: - * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. Environment identifier. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * * Must be unique within the lake. - * - * Generated from protobuf field string environment_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getEnvironmentId() - { - return $this->environment_id; - } - - /** - * Required. Environment identifier. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * * Must be unique within the lake. - * - * Generated from protobuf field string environment_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setEnvironmentId($var) - { - GPBUtil::checkString($var, True); - $this->environment_id = $var; - - return $this; - } - - /** - * Required. Environment resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Environment environment = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataplex\V1\Environment|null - */ - public function getEnvironment() - { - return $this->environment; - } - - public function hasEnvironment() - { - return isset($this->environment); - } - - public function clearEnvironment() - { - unset($this->environment); - } - - /** - * Required. Environment resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Environment environment = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataplex\V1\Environment $var - * @return $this - */ - public function setEnvironment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Environment::class); - $this->environment = $var; - - return $this; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateLakeRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateLakeRequest.php deleted file mode 100644 index 0a4f55da6883..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateLakeRequest.php +++ /dev/null @@ -1,246 +0,0 @@ -google.cloud.dataplex.v1.CreateLakeRequest - */ -class CreateLakeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the lake location, of the form: - * projects/{project_number}/locations/{location_id} - * where `location_id` refers to a GCP region. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Lake identifier. - * This ID will be used to generate names such as database and dataset names - * when publishing metadata to Hive Metastore and BigQuery. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must end with a number or a letter. - * * Must be between 1-63 characters. - * * Must be unique within the customer project / location. - * - * Generated from protobuf field string lake_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $lake_id = ''; - /** - * Required. Lake resource - * - * Generated from protobuf field .google.cloud.dataplex.v1.Lake lake = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $lake = null; - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validate_only = false; - - /** - * @param string $parent Required. The resource name of the lake location, of the form: - * projects/{project_number}/locations/{location_id} - * where `location_id` refers to a GCP region. Please see - * {@see DataplexServiceClient::locationName()} for help formatting this field. - * @param \Google\Cloud\Dataplex\V1\Lake $lake Required. Lake resource - * @param string $lakeId Required. Lake identifier. - * This ID will be used to generate names such as database and dataset names - * when publishing metadata to Hive Metastore and BigQuery. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must end with a number or a letter. - * * Must be between 1-63 characters. - * * Must be unique within the customer project / location. - * - * @return \Google\Cloud\Dataplex\V1\CreateLakeRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Dataplex\V1\Lake $lake, string $lakeId): self - { - return (new self()) - ->setParent($parent) - ->setLake($lake) - ->setLakeId($lakeId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the lake location, of the form: - * projects/{project_number}/locations/{location_id} - * where `location_id` refers to a GCP region. - * @type string $lake_id - * Required. Lake identifier. - * This ID will be used to generate names such as database and dataset names - * when publishing metadata to Hive Metastore and BigQuery. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must end with a number or a letter. - * * Must be between 1-63 characters. - * * Must be unique within the customer project / location. - * @type \Google\Cloud\Dataplex\V1\Lake $lake - * Required. Lake resource - * @type bool $validate_only - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the lake location, of the form: - * projects/{project_number}/locations/{location_id} - * where `location_id` refers to a GCP region. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The resource name of the lake location, of the form: - * projects/{project_number}/locations/{location_id} - * where `location_id` refers to a GCP region. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. Lake identifier. - * This ID will be used to generate names such as database and dataset names - * when publishing metadata to Hive Metastore and BigQuery. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must end with a number or a letter. - * * Must be between 1-63 characters. - * * Must be unique within the customer project / location. - * - * Generated from protobuf field string lake_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getLakeId() - { - return $this->lake_id; - } - - /** - * Required. Lake identifier. - * This ID will be used to generate names such as database and dataset names - * when publishing metadata to Hive Metastore and BigQuery. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must end with a number or a letter. - * * Must be between 1-63 characters. - * * Must be unique within the customer project / location. - * - * Generated from protobuf field string lake_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setLakeId($var) - { - GPBUtil::checkString($var, True); - $this->lake_id = $var; - - return $this; - } - - /** - * Required. Lake resource - * - * Generated from protobuf field .google.cloud.dataplex.v1.Lake lake = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataplex\V1\Lake|null - */ - public function getLake() - { - return $this->lake; - } - - public function hasLake() - { - return isset($this->lake); - } - - public function clearLake() - { - unset($this->lake); - } - - /** - * Required. Lake resource - * - * Generated from protobuf field .google.cloud.dataplex.v1.Lake lake = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataplex\V1\Lake $var - * @return $this - */ - public function setLake($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Lake::class); - $this->lake = $var; - - return $this; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreatePartitionRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreatePartitionRequest.php deleted file mode 100644 index 103aa8f21d19..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreatePartitionRequest.php +++ /dev/null @@ -1,170 +0,0 @@ -google.cloud.dataplex.v1.CreatePartitionRequest - */ -class CreatePartitionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Partition resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Partition partition = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $partition = null; - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validate_only = false; - - /** - * @param string $parent Required. The resource name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. Please see - * {@see MetadataServiceClient::entityName()} for help formatting this field. - * @param \Google\Cloud\Dataplex\V1\Partition $partition Required. Partition resource. - * - * @return \Google\Cloud\Dataplex\V1\CreatePartitionRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Dataplex\V1\Partition $partition): self - { - return (new self()) - ->setParent($parent) - ->setPartition($partition); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. - * @type \Google\Cloud\Dataplex\V1\Partition $partition - * Required. Partition resource. - * @type bool $validate_only - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Metadata::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The resource name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. Partition resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Partition partition = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataplex\V1\Partition|null - */ - public function getPartition() - { - return $this->partition; - } - - public function hasPartition() - { - return isset($this->partition); - } - - public function clearPartition() - { - unset($this->partition); - } - - /** - * Required. Partition resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Partition partition = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataplex\V1\Partition $var - * @return $this - */ - public function setPartition($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Partition::class); - $this->partition = $var; - - return $this; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateTaskRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateTaskRequest.php deleted file mode 100644 index 5fb51f83898d..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateTaskRequest.php +++ /dev/null @@ -1,206 +0,0 @@ -google.cloud.dataplex.v1.CreateTaskRequest - */ -class CreateTaskRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the parent lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Task identifier. - * - * Generated from protobuf field string task_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $task_id = ''; - /** - * Required. Task resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Task task = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $task = null; - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validate_only = false; - - /** - * @param string $parent Required. The resource name of the parent lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. Please see - * {@see DataplexServiceClient::lakeName()} for help formatting this field. - * @param \Google\Cloud\Dataplex\V1\Task $task Required. Task resource. - * @param string $taskId Required. Task identifier. - * - * @return \Google\Cloud\Dataplex\V1\CreateTaskRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Dataplex\V1\Task $task, string $taskId): self - { - return (new self()) - ->setParent($parent) - ->setTask($task) - ->setTaskId($taskId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the parent lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * @type string $task_id - * Required. Task identifier. - * @type \Google\Cloud\Dataplex\V1\Task $task - * Required. Task resource. - * @type bool $validate_only - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the parent lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The resource name of the parent lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. Task identifier. - * - * Generated from protobuf field string task_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getTaskId() - { - return $this->task_id; - } - - /** - * Required. Task identifier. - * - * Generated from protobuf field string task_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setTaskId($var) - { - GPBUtil::checkString($var, True); - $this->task_id = $var; - - return $this; - } - - /** - * Required. Task resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Task task = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataplex\V1\Task|null - */ - public function getTask() - { - return $this->task; - } - - public function hasTask() - { - return isset($this->task); - } - - public function clearTask() - { - unset($this->task); - } - - /** - * Required. Task resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Task task = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataplex\V1\Task $var - * @return $this - */ - public function setTask($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Task::class); - $this->task = $var; - - return $this; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateZoneRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateZoneRequest.php deleted file mode 100644 index 6ef76089afec..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/CreateZoneRequest.php +++ /dev/null @@ -1,246 +0,0 @@ -google.cloud.dataplex.v1.CreateZoneRequest - */ -class CreateZoneRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the parent lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Zone identifier. - * This ID will be used to generate names such as database and dataset names - * when publishing metadata to Hive Metastore and BigQuery. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must end with a number or a letter. - * * Must be between 1-63 characters. - * * Must be unique across all lakes from all locations in a project. - * * Must not be one of the reserved IDs (i.e. "default", "global-temp") - * - * Generated from protobuf field string zone_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $zone_id = ''; - /** - * Required. Zone resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Zone zone = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $zone = null; - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validate_only = false; - - /** - * @param string $parent Required. The resource name of the parent lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. Please see - * {@see DataplexServiceClient::lakeName()} for help formatting this field. - * @param \Google\Cloud\Dataplex\V1\Zone $zone Required. Zone resource. - * @param string $zoneId Required. Zone identifier. - * This ID will be used to generate names such as database and dataset names - * when publishing metadata to Hive Metastore and BigQuery. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must end with a number or a letter. - * * Must be between 1-63 characters. - * * Must be unique across all lakes from all locations in a project. - * * Must not be one of the reserved IDs (i.e. "default", "global-temp") - * - * @return \Google\Cloud\Dataplex\V1\CreateZoneRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Dataplex\V1\Zone $zone, string $zoneId): self - { - return (new self()) - ->setParent($parent) - ->setZone($zone) - ->setZoneId($zoneId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the parent lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * @type string $zone_id - * Required. Zone identifier. - * This ID will be used to generate names such as database and dataset names - * when publishing metadata to Hive Metastore and BigQuery. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must end with a number or a letter. - * * Must be between 1-63 characters. - * * Must be unique across all lakes from all locations in a project. - * * Must not be one of the reserved IDs (i.e. "default", "global-temp") - * @type \Google\Cloud\Dataplex\V1\Zone $zone - * Required. Zone resource. - * @type bool $validate_only - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the parent lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The resource name of the parent lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. Zone identifier. - * This ID will be used to generate names such as database and dataset names - * when publishing metadata to Hive Metastore and BigQuery. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must end with a number or a letter. - * * Must be between 1-63 characters. - * * Must be unique across all lakes from all locations in a project. - * * Must not be one of the reserved IDs (i.e. "default", "global-temp") - * - * Generated from protobuf field string zone_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getZoneId() - { - return $this->zone_id; - } - - /** - * Required. Zone identifier. - * This ID will be used to generate names such as database and dataset names - * when publishing metadata to Hive Metastore and BigQuery. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must end with a number or a letter. - * * Must be between 1-63 characters. - * * Must be unique across all lakes from all locations in a project. - * * Must not be one of the reserved IDs (i.e. "default", "global-temp") - * - * Generated from protobuf field string zone_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setZoneId($var) - { - GPBUtil::checkString($var, True); - $this->zone_id = $var; - - return $this; - } - - /** - * Required. Zone resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Zone zone = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataplex\V1\Zone|null - */ - public function getZone() - { - return $this->zone; - } - - public function hasZone() - { - return isset($this->zone); - } - - public function clearZone() - { - unset($this->zone); - } - - /** - * Required. Zone resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Zone zone = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataplex\V1\Zone $var - * @return $this - */ - public function setZone($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Zone::class); - $this->zone = $var; - - return $this; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataAccessSpec.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataAccessSpec.php deleted file mode 100644 index 7914ac8aa22a..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataAccessSpec.php +++ /dev/null @@ -1,83 +0,0 @@ -google.cloud.dataplex.v1.DataAccessSpec - */ -class DataAccessSpec extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The format of strings follows the pattern followed by IAM in the - * bindings. user:{email}, serviceAccount:{email} group:{email}. - * The set of principals to be granted reader role on data - * stored within resources. - * - * Generated from protobuf field repeated string readers = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $readers; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $readers - * Optional. The format of strings follows the pattern followed by IAM in the - * bindings. user:{email}, serviceAccount:{email} group:{email}. - * The set of principals to be granted reader role on data - * stored within resources. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Security::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The format of strings follows the pattern followed by IAM in the - * bindings. user:{email}, serviceAccount:{email} group:{email}. - * The set of principals to be granted reader role on data - * stored within resources. - * - * Generated from protobuf field repeated string readers = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getReaders() - { - return $this->readers; - } - - /** - * Optional. The format of strings follows the pattern followed by IAM in the - * bindings. user:{email}, serviceAccount:{email} group:{email}. - * The set of principals to be granted reader role on data - * stored within resources. - * - * Generated from protobuf field repeated string readers = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setReaders($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->readers = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataAttribute.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataAttribute.php deleted file mode 100644 index 6e3eca726f5e..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataAttribute.php +++ /dev/null @@ -1,530 +0,0 @@ -google.cloud.dataplex.v1.DataAttribute - */ -class DataAttribute extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The relative resource name of the dataAttribute, of the form: - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Output only. System generated globally unique ID for the DataAttribute. - * This ID will be different if the DataAttribute is deleted and re-created - * with the same name. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - /** - * Output only. The time when the DataAttribute was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time when the DataAttribute was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Optional. Description of the DataAttribute. - * - * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Optional. User friendly display name. - * - * Generated from protobuf field string display_name = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $display_name = ''; - /** - * Optional. User-defined labels for the DataAttribute. - * - * Generated from protobuf field map labels = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * Optional. The ID of the parent DataAttribute resource, should belong to the - * same data taxonomy. Circular dependency in parent chain is not valid. - * Maximum depth of the hierarchy allowed is 4. - * [a -> b -> c -> d -> e, depth = 4] - * - * Generated from protobuf field string parent_id = 8 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - protected $parent_id = ''; - /** - * Output only. The number of child attributes present for this attribute. - * - * Generated from protobuf field int32 attribute_count = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $attribute_count = 0; - /** - * This checksum is computed by the server based on the value of other - * fields, and may be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * - * Generated from protobuf field string etag = 10; - */ - protected $etag = ''; - /** - * Optional. Specified when applied to a resource (eg: Cloud Storage bucket, - * BigQuery dataset, BigQuery table). - * - * Generated from protobuf field .google.cloud.dataplex.v1.ResourceAccessSpec resource_access_spec = 100 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $resource_access_spec = null; - /** - * Optional. Specified when applied to data stored on the resource (eg: rows, - * columns in BigQuery Tables). - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataAccessSpec data_access_spec = 101 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $data_access_spec = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The relative resource name of the dataAttribute, of the form: - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}. - * @type string $uid - * Output only. System generated globally unique ID for the DataAttribute. - * This ID will be different if the DataAttribute is deleted and re-created - * with the same name. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time when the DataAttribute was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time when the DataAttribute was last updated. - * @type string $description - * Optional. Description of the DataAttribute. - * @type string $display_name - * Optional. User friendly display name. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. User-defined labels for the DataAttribute. - * @type string $parent_id - * Optional. The ID of the parent DataAttribute resource, should belong to the - * same data taxonomy. Circular dependency in parent chain is not valid. - * Maximum depth of the hierarchy allowed is 4. - * [a -> b -> c -> d -> e, depth = 4] - * @type int $attribute_count - * Output only. The number of child attributes present for this attribute. - * @type string $etag - * This checksum is computed by the server based on the value of other - * fields, and may be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * @type \Google\Cloud\Dataplex\V1\ResourceAccessSpec $resource_access_spec - * Optional. Specified when applied to a resource (eg: Cloud Storage bucket, - * BigQuery dataset, BigQuery table). - * @type \Google\Cloud\Dataplex\V1\DataAccessSpec $data_access_spec - * Optional. Specified when applied to data stored on the resource (eg: rows, - * columns in BigQuery Tables). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataTaxonomy::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The relative resource name of the dataAttribute, of the form: - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The relative resource name of the dataAttribute, of the form: - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. System generated globally unique ID for the DataAttribute. - * This ID will be different if the DataAttribute is deleted and re-created - * with the same name. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. System generated globally unique ID for the DataAttribute. - * This ID will be different if the DataAttribute is deleted and re-created - * with the same name. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - - /** - * Output only. The time when the DataAttribute was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time when the DataAttribute was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The time when the DataAttribute was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The time when the DataAttribute was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Optional. Description of the DataAttribute. - * - * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. Description of the DataAttribute. - * - * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Optional. User friendly display name. - * - * Generated from protobuf field string display_name = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Optional. User friendly display name. - * - * Generated from protobuf field string display_name = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Optional. User-defined labels for the DataAttribute. - * - * Generated from protobuf field map labels = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. User-defined labels for the DataAttribute. - * - * Generated from protobuf field map labels = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Optional. The ID of the parent DataAttribute resource, should belong to the - * same data taxonomy. Circular dependency in parent chain is not valid. - * Maximum depth of the hierarchy allowed is 4. - * [a -> b -> c -> d -> e, depth = 4] - * - * Generated from protobuf field string parent_id = 8 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return string - */ - public function getParentId() - { - return $this->parent_id; - } - - /** - * Optional. The ID of the parent DataAttribute resource, should belong to the - * same data taxonomy. Circular dependency in parent chain is not valid. - * Maximum depth of the hierarchy allowed is 4. - * [a -> b -> c -> d -> e, depth = 4] - * - * Generated from protobuf field string parent_id = 8 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParentId($var) - { - GPBUtil::checkString($var, True); - $this->parent_id = $var; - - return $this; - } - - /** - * Output only. The number of child attributes present for this attribute. - * - * Generated from protobuf field int32 attribute_count = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getAttributeCount() - { - return $this->attribute_count; - } - - /** - * Output only. The number of child attributes present for this attribute. - * - * Generated from protobuf field int32 attribute_count = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setAttributeCount($var) - { - GPBUtil::checkInt32($var); - $this->attribute_count = $var; - - return $this; - } - - /** - * This checksum is computed by the server based on the value of other - * fields, and may be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * - * Generated from protobuf field string etag = 10; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * This checksum is computed by the server based on the value of other - * fields, and may be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * - * Generated from protobuf field string etag = 10; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - - /** - * Optional. Specified when applied to a resource (eg: Cloud Storage bucket, - * BigQuery dataset, BigQuery table). - * - * Generated from protobuf field .google.cloud.dataplex.v1.ResourceAccessSpec resource_access_spec = 100 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataplex\V1\ResourceAccessSpec|null - */ - public function getResourceAccessSpec() - { - return $this->resource_access_spec; - } - - public function hasResourceAccessSpec() - { - return isset($this->resource_access_spec); - } - - public function clearResourceAccessSpec() - { - unset($this->resource_access_spec); - } - - /** - * Optional. Specified when applied to a resource (eg: Cloud Storage bucket, - * BigQuery dataset, BigQuery table). - * - * Generated from protobuf field .google.cloud.dataplex.v1.ResourceAccessSpec resource_access_spec = 100 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataplex\V1\ResourceAccessSpec $var - * @return $this - */ - public function setResourceAccessSpec($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\ResourceAccessSpec::class); - $this->resource_access_spec = $var; - - return $this; - } - - /** - * Optional. Specified when applied to data stored on the resource (eg: rows, - * columns in BigQuery Tables). - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataAccessSpec data_access_spec = 101 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataplex\V1\DataAccessSpec|null - */ - public function getDataAccessSpec() - { - return $this->data_access_spec; - } - - public function hasDataAccessSpec() - { - return isset($this->data_access_spec); - } - - public function clearDataAccessSpec() - { - unset($this->data_access_spec); - } - - /** - * Optional. Specified when applied to data stored on the resource (eg: rows, - * columns in BigQuery Tables). - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataAccessSpec data_access_spec = 101 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataplex\V1\DataAccessSpec $var - * @return $this - */ - public function setDataAccessSpec($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataAccessSpec::class); - $this->data_access_spec = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataAttributeBinding.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataAttributeBinding.php deleted file mode 100644 index 0b04d11921e0..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataAttributeBinding.php +++ /dev/null @@ -1,492 +0,0 @@ -google.cloud.dataplex.v1.DataAttributeBinding - */ -class DataAttributeBinding extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The relative resource name of the Data Attribute Binding, of - * the form: - * projects/{project_number}/locations/{location}/dataAttributeBindings/{data_attribute_binding_id} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Output only. System generated globally unique ID for the - * DataAttributeBinding. This ID will be different if the DataAttributeBinding - * is deleted and re-created with the same name. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - /** - * Output only. The time when the DataAttributeBinding was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time when the DataAttributeBinding was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Optional. Description of the DataAttributeBinding. - * - * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Optional. User friendly display name. - * - * Generated from protobuf field string display_name = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $display_name = ''; - /** - * Optional. User-defined labels for the DataAttributeBinding. - * - * Generated from protobuf field map labels = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * This checksum is computed by the server based on the value of other - * fields, and may be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * Etags must be used when calling the DeleteDataAttributeBinding and the - * UpdateDataAttributeBinding method. - * - * Generated from protobuf field string etag = 8; - */ - protected $etag = ''; - /** - * Optional. List of attributes to be associated with the resource, provided - * in the form: - * projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id} - * - * Generated from protobuf field repeated string attributes = 110 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - private $attributes; - /** - * Optional. The list of paths for items within the associated resource (eg. - * columns and partitions within a table) along with attribute bindings. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataAttributeBinding.Path paths = 120 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $paths; - protected $resource_reference; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The relative resource name of the Data Attribute Binding, of - * the form: - * projects/{project_number}/locations/{location}/dataAttributeBindings/{data_attribute_binding_id} - * @type string $uid - * Output only. System generated globally unique ID for the - * DataAttributeBinding. This ID will be different if the DataAttributeBinding - * is deleted and re-created with the same name. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time when the DataAttributeBinding was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time when the DataAttributeBinding was last updated. - * @type string $description - * Optional. Description of the DataAttributeBinding. - * @type string $display_name - * Optional. User friendly display name. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. User-defined labels for the DataAttributeBinding. - * @type string $etag - * This checksum is computed by the server based on the value of other - * fields, and may be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * Etags must be used when calling the DeleteDataAttributeBinding and the - * UpdateDataAttributeBinding method. - * @type string $resource - * Optional. Immutable. The resource name of the resource that is associated - * to attributes. Presently, only entity resource is supported in the form: - * projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity_id} - * Must belong in the same project and region as the attribute binding, and - * there can only exist one active binding for a resource. - * @type array|\Google\Protobuf\Internal\RepeatedField $attributes - * Optional. List of attributes to be associated with the resource, provided - * in the form: - * projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id} - * @type array<\Google\Cloud\Dataplex\V1\DataAttributeBinding\Path>|\Google\Protobuf\Internal\RepeatedField $paths - * Optional. The list of paths for items within the associated resource (eg. - * columns and partitions within a table) along with attribute bindings. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataTaxonomy::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The relative resource name of the Data Attribute Binding, of - * the form: - * projects/{project_number}/locations/{location}/dataAttributeBindings/{data_attribute_binding_id} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The relative resource name of the Data Attribute Binding, of - * the form: - * projects/{project_number}/locations/{location}/dataAttributeBindings/{data_attribute_binding_id} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. System generated globally unique ID for the - * DataAttributeBinding. This ID will be different if the DataAttributeBinding - * is deleted and re-created with the same name. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. System generated globally unique ID for the - * DataAttributeBinding. This ID will be different if the DataAttributeBinding - * is deleted and re-created with the same name. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - - /** - * Output only. The time when the DataAttributeBinding was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time when the DataAttributeBinding was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The time when the DataAttributeBinding was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The time when the DataAttributeBinding was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Optional. Description of the DataAttributeBinding. - * - * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. Description of the DataAttributeBinding. - * - * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Optional. User friendly display name. - * - * Generated from protobuf field string display_name = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Optional. User friendly display name. - * - * Generated from protobuf field string display_name = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Optional. User-defined labels for the DataAttributeBinding. - * - * Generated from protobuf field map labels = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. User-defined labels for the DataAttributeBinding. - * - * Generated from protobuf field map labels = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * This checksum is computed by the server based on the value of other - * fields, and may be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * Etags must be used when calling the DeleteDataAttributeBinding and the - * UpdateDataAttributeBinding method. - * - * Generated from protobuf field string etag = 8; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * This checksum is computed by the server based on the value of other - * fields, and may be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * Etags must be used when calling the DeleteDataAttributeBinding and the - * UpdateDataAttributeBinding method. - * - * Generated from protobuf field string etag = 8; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - - /** - * Optional. Immutable. The resource name of the resource that is associated - * to attributes. Presently, only entity resource is supported in the form: - * projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity_id} - * Must belong in the same project and region as the attribute binding, and - * there can only exist one active binding for a resource. - * - * Generated from protobuf field string resource = 100 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getResource() - { - return $this->readOneof(100); - } - - public function hasResource() - { - return $this->hasOneof(100); - } - - /** - * Optional. Immutable. The resource name of the resource that is associated - * to attributes. Presently, only entity resource is supported in the form: - * projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity_id} - * Must belong in the same project and region as the attribute binding, and - * there can only exist one active binding for a resource. - * - * Generated from protobuf field string resource = 100 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setResource($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(100, $var); - - return $this; - } - - /** - * Optional. List of attributes to be associated with the resource, provided - * in the form: - * projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id} - * - * Generated from protobuf field repeated string attributes = 110 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAttributes() - { - return $this->attributes; - } - - /** - * Optional. List of attributes to be associated with the resource, provided - * in the form: - * projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id} - * - * Generated from protobuf field repeated string attributes = 110 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAttributes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->attributes = $arr; - - return $this; - } - - /** - * Optional. The list of paths for items within the associated resource (eg. - * columns and partitions within a table) along with attribute bindings. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataAttributeBinding.Path paths = 120 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPaths() - { - return $this->paths; - } - - /** - * Optional. The list of paths for items within the associated resource (eg. - * columns and partitions within a table) along with attribute bindings. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataAttributeBinding.Path paths = 120 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\Dataplex\V1\DataAttributeBinding\Path>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPaths($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\DataAttributeBinding\Path::class); - $this->paths = $arr; - - return $this; - } - - /** - * @return string - */ - public function getResourceReference() - { - return $this->whichOneof("resource_reference"); - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataAttributeBinding/Path.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataAttributeBinding/Path.php deleted file mode 100644 index ea8acf4f071e..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataAttributeBinding/Path.php +++ /dev/null @@ -1,118 +0,0 @@ -google.cloud.dataplex.v1.DataAttributeBinding.Path - */ -class Path extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name identifier of the path. - * Nested columns should be of the form: 'address.city'. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Optional. List of attributes to be associated with the path of the - * resource, provided in the form: - * projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id} - * - * Generated from protobuf field repeated string attributes = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - private $attributes; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name identifier of the path. - * Nested columns should be of the form: 'address.city'. - * @type array|\Google\Protobuf\Internal\RepeatedField $attributes - * Optional. List of attributes to be associated with the path of the - * resource, provided in the form: - * projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id} - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataTaxonomy::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name identifier of the path. - * Nested columns should be of the form: 'address.city'. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name identifier of the path. - * Nested columns should be of the form: 'address.city'. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. List of attributes to be associated with the path of the - * resource, provided in the form: - * projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id} - * - * Generated from protobuf field repeated string attributes = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAttributes() - { - return $this->attributes; - } - - /** - * Optional. List of attributes to be associated with the path of the - * resource, provided in the form: - * projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id} - * - * Generated from protobuf field repeated string attributes = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAttributes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->attributes = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Path::class, \Google\Cloud\Dataplex\V1\DataAttributeBinding_Path::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult.php deleted file mode 100644 index ec707235fd6c..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult.php +++ /dev/null @@ -1,200 +0,0 @@ -google.cloud.dataplex.v1.DataProfileResult - */ -class DataProfileResult extends \Google\Protobuf\Internal\Message -{ - /** - * The count of rows scanned. - * - * Generated from protobuf field int64 row_count = 3; - */ - protected $row_count = 0; - /** - * The profile information per field. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileResult.Profile profile = 4; - */ - protected $profile = null; - /** - * The data scanned for this result. - * - * Generated from protobuf field .google.cloud.dataplex.v1.ScannedData scanned_data = 5; - */ - protected $scanned_data = null; - /** - * Output only. The result of post scan actions. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult post_scan_actions_result = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $post_scan_actions_result = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $row_count - * The count of rows scanned. - * @type \Google\Cloud\Dataplex\V1\DataProfileResult\Profile $profile - * The profile information per field. - * @type \Google\Cloud\Dataplex\V1\ScannedData $scanned_data - * The data scanned for this result. - * @type \Google\Cloud\Dataplex\V1\DataProfileResult\PostScanActionsResult $post_scan_actions_result - * Output only. The result of post scan actions. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataProfile::initOnce(); - parent::__construct($data); - } - - /** - * The count of rows scanned. - * - * Generated from protobuf field int64 row_count = 3; - * @return int|string - */ - public function getRowCount() - { - return $this->row_count; - } - - /** - * The count of rows scanned. - * - * Generated from protobuf field int64 row_count = 3; - * @param int|string $var - * @return $this - */ - public function setRowCount($var) - { - GPBUtil::checkInt64($var); - $this->row_count = $var; - - return $this; - } - - /** - * The profile information per field. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileResult.Profile profile = 4; - * @return \Google\Cloud\Dataplex\V1\DataProfileResult\Profile|null - */ - public function getProfile() - { - return $this->profile; - } - - public function hasProfile() - { - return isset($this->profile); - } - - public function clearProfile() - { - unset($this->profile); - } - - /** - * The profile information per field. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileResult.Profile profile = 4; - * @param \Google\Cloud\Dataplex\V1\DataProfileResult\Profile $var - * @return $this - */ - public function setProfile($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataProfileResult\Profile::class); - $this->profile = $var; - - return $this; - } - - /** - * The data scanned for this result. - * - * Generated from protobuf field .google.cloud.dataplex.v1.ScannedData scanned_data = 5; - * @return \Google\Cloud\Dataplex\V1\ScannedData|null - */ - public function getScannedData() - { - return $this->scanned_data; - } - - public function hasScannedData() - { - return isset($this->scanned_data); - } - - public function clearScannedData() - { - unset($this->scanned_data); - } - - /** - * The data scanned for this result. - * - * Generated from protobuf field .google.cloud.dataplex.v1.ScannedData scanned_data = 5; - * @param \Google\Cloud\Dataplex\V1\ScannedData $var - * @return $this - */ - public function setScannedData($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\ScannedData::class); - $this->scanned_data = $var; - - return $this; - } - - /** - * Output only. The result of post scan actions. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult post_scan_actions_result = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Dataplex\V1\DataProfileResult\PostScanActionsResult|null - */ - public function getPostScanActionsResult() - { - return $this->post_scan_actions_result; - } - - public function hasPostScanActionsResult() - { - return isset($this->post_scan_actions_result); - } - - public function clearPostScanActionsResult() - { - unset($this->post_scan_actions_result); - } - - /** - * Output only. The result of post scan actions. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult post_scan_actions_result = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Dataplex\V1\DataProfileResult\PostScanActionsResult $var - * @return $this - */ - public function setPostScanActionsResult($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataProfileResult\PostScanActionsResult::class); - $this->post_scan_actions_result = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/PostScanActionsResult.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/PostScanActionsResult.php deleted file mode 100644 index 9079ae4ede3d..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/PostScanActionsResult.php +++ /dev/null @@ -1,80 +0,0 @@ -google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult - */ -class PostScanActionsResult extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The result of BigQuery export post scan action. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult bigquery_export_result = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $bigquery_export_result = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dataplex\V1\DataProfileResult\PostScanActionsResult\BigQueryExportResult $bigquery_export_result - * Output only. The result of BigQuery export post scan action. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataProfile::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The result of BigQuery export post scan action. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult bigquery_export_result = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Dataplex\V1\DataProfileResult\PostScanActionsResult\BigQueryExportResult|null - */ - public function getBigqueryExportResult() - { - return $this->bigquery_export_result; - } - - public function hasBigqueryExportResult() - { - return isset($this->bigquery_export_result); - } - - public function clearBigqueryExportResult() - { - unset($this->bigquery_export_result); - } - - /** - * Output only. The result of BigQuery export post scan action. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult bigquery_export_result = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Dataplex\V1\DataProfileResult\PostScanActionsResult\BigQueryExportResult $var - * @return $this - */ - public function setBigqueryExportResult($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataProfileResult\PostScanActionsResult\BigQueryExportResult::class); - $this->bigquery_export_result = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(PostScanActionsResult::class, \Google\Cloud\Dataplex\V1\DataProfileResult_PostScanActionsResult::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/PostScanActionsResult/BigQueryExportResult.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/PostScanActionsResult/BigQueryExportResult.php deleted file mode 100644 index 27ad4e98a6b0..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/PostScanActionsResult/BigQueryExportResult.php +++ /dev/null @@ -1,104 +0,0 @@ -google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult - */ -class BigQueryExportResult extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Execution state for the BigQuery exporting. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. Additional information about the BigQuery exporting. - * - * Generated from protobuf field string message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $message = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $state - * Output only. Execution state for the BigQuery exporting. - * @type string $message - * Output only. Additional information about the BigQuery exporting. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataProfile::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Execution state for the BigQuery exporting. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. Execution state for the BigQuery exporting. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\DataProfileResult\PostScanActionsResult\BigQueryExportResult\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. Additional information about the BigQuery exporting. - * - * Generated from protobuf field string message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getMessage() - { - return $this->message; - } - - /** - * Output only. Additional information about the BigQuery exporting. - * - * Generated from protobuf field string message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setMessage($var) - { - GPBUtil::checkString($var, True); - $this->message = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(BigQueryExportResult::class, \Google\Cloud\Dataplex\V1\DataProfileResult_PostScanActionsResult_BigQueryExportResult::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/PostScanActionsResult/BigQueryExportResult/State.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/PostScanActionsResult/BigQueryExportResult/State.php deleted file mode 100644 index 9b25526359e4..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/PostScanActionsResult/BigQueryExportResult/State.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult.State - */ -class State -{ - /** - * The exporting state is unspecified. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The exporting completed successfully. - * - * Generated from protobuf enum SUCCEEDED = 1; - */ - const SUCCEEDED = 1; - /** - * The exporting is no longer running due to an error. - * - * Generated from protobuf enum FAILED = 2; - */ - const FAILED = 2; - /** - * The exporting is skipped due to no valid scan result to export - * (usually caused by scan failed). - * - * Generated from protobuf enum SKIPPED = 3; - */ - const SKIPPED = 3; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::SUCCEEDED => 'SUCCEEDED', - self::FAILED => 'FAILED', - self::SKIPPED => 'SKIPPED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\Dataplex\V1\DataProfileResult_PostScanActionsResult_BigQueryExportResult_State::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/Profile.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/Profile.php deleted file mode 100644 index d65af5ea5427..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/Profile.php +++ /dev/null @@ -1,70 +0,0 @@ -google.cloud.dataplex.v1.DataProfileResult.Profile - */ -class Profile extends \Google\Protobuf\Internal\Message -{ - /** - * List of fields with structural and profile information for each field. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataProfileResult.Profile.Field fields = 2; - */ - private $fields; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Dataplex\V1\DataProfileResult\Profile\Field>|\Google\Protobuf\Internal\RepeatedField $fields - * List of fields with structural and profile information for each field. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataProfile::initOnce(); - parent::__construct($data); - } - - /** - * List of fields with structural and profile information for each field. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataProfileResult.Profile.Field fields = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFields() - { - return $this->fields; - } - - /** - * List of fields with structural and profile information for each field. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataProfileResult.Profile.Field fields = 2; - * @param array<\Google\Cloud\Dataplex\V1\DataProfileResult\Profile\Field>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFields($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\DataProfileResult\Profile\Field::class); - $this->fields = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Profile::class, \Google\Cloud\Dataplex\V1\DataProfileResult_Profile::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/Profile/Field.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/Profile/Field.php deleted file mode 100644 index f54274be71f4..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/Profile/Field.php +++ /dev/null @@ -1,210 +0,0 @@ -google.cloud.dataplex.v1.DataProfileResult.Profile.Field - */ -class Field extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the field. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The data type retrieved from the schema of the data source. For - * instance, for a BigQuery native table, it is the [BigQuery Table - * Schema](https://cloud.google.com/bigquery/docs/reference/rest/v2/tables#tablefieldschema). - * For a Dataplex Entity, it is the [Entity - * Schema](https://cloud.google.com/dataplex/docs/reference/rpc/google.cloud.dataplex.v1#type_3). - * - * Generated from protobuf field string type = 2; - */ - protected $type = ''; - /** - * The mode of the field. Possible values include: - * * REQUIRED, if it is a required field. - * * NULLABLE, if it is an optional field. - * * REPEATED, if it is a repeated field. - * - * Generated from protobuf field string mode = 3; - */ - protected $mode = ''; - /** - * Profile information for the corresponding field. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo profile = 4; - */ - protected $profile = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The name of the field. - * @type string $type - * The data type retrieved from the schema of the data source. For - * instance, for a BigQuery native table, it is the [BigQuery Table - * Schema](https://cloud.google.com/bigquery/docs/reference/rest/v2/tables#tablefieldschema). - * For a Dataplex Entity, it is the [Entity - * Schema](https://cloud.google.com/dataplex/docs/reference/rpc/google.cloud.dataplex.v1#type_3). - * @type string $mode - * The mode of the field. Possible values include: - * * REQUIRED, if it is a required field. - * * NULLABLE, if it is an optional field. - * * REPEATED, if it is a repeated field. - * @type \Google\Cloud\Dataplex\V1\DataProfileResult\Profile\Field\ProfileInfo $profile - * Profile information for the corresponding field. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataProfile::initOnce(); - parent::__construct($data); - } - - /** - * The name of the field. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name of the field. - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The data type retrieved from the schema of the data source. For - * instance, for a BigQuery native table, it is the [BigQuery Table - * Schema](https://cloud.google.com/bigquery/docs/reference/rest/v2/tables#tablefieldschema). - * For a Dataplex Entity, it is the [Entity - * Schema](https://cloud.google.com/dataplex/docs/reference/rpc/google.cloud.dataplex.v1#type_3). - * - * Generated from protobuf field string type = 2; - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * The data type retrieved from the schema of the data source. For - * instance, for a BigQuery native table, it is the [BigQuery Table - * Schema](https://cloud.google.com/bigquery/docs/reference/rest/v2/tables#tablefieldschema). - * For a Dataplex Entity, it is the [Entity - * Schema](https://cloud.google.com/dataplex/docs/reference/rpc/google.cloud.dataplex.v1#type_3). - * - * Generated from protobuf field string type = 2; - * @param string $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkString($var, True); - $this->type = $var; - - return $this; - } - - /** - * The mode of the field. Possible values include: - * * REQUIRED, if it is a required field. - * * NULLABLE, if it is an optional field. - * * REPEATED, if it is a repeated field. - * - * Generated from protobuf field string mode = 3; - * @return string - */ - public function getMode() - { - return $this->mode; - } - - /** - * The mode of the field. Possible values include: - * * REQUIRED, if it is a required field. - * * NULLABLE, if it is an optional field. - * * REPEATED, if it is a repeated field. - * - * Generated from protobuf field string mode = 3; - * @param string $var - * @return $this - */ - public function setMode($var) - { - GPBUtil::checkString($var, True); - $this->mode = $var; - - return $this; - } - - /** - * Profile information for the corresponding field. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo profile = 4; - * @return \Google\Cloud\Dataplex\V1\DataProfileResult\Profile\Field\ProfileInfo|null - */ - public function getProfile() - { - return $this->profile; - } - - public function hasProfile() - { - return isset($this->profile); - } - - public function clearProfile() - { - unset($this->profile); - } - - /** - * Profile information for the corresponding field. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo profile = 4; - * @param \Google\Cloud\Dataplex\V1\DataProfileResult\Profile\Field\ProfileInfo $var - * @return $this - */ - public function setProfile($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataProfileResult\Profile\Field\ProfileInfo::class); - $this->profile = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Field::class, \Google\Cloud\Dataplex\V1\DataProfileResult_Profile_Field::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/Profile/Field/ProfileInfo.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/Profile/Field/ProfileInfo.php deleted file mode 100644 index 87b2797462ae..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/Profile/Field/ProfileInfo.php +++ /dev/null @@ -1,270 +0,0 @@ -google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo - */ -class ProfileInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Ratio of rows with null value against total scanned rows. - * - * Generated from protobuf field double null_ratio = 2; - */ - protected $null_ratio = 0.0; - /** - * Ratio of rows with distinct values against total scanned rows. - * Not available for complex non-groupable field type RECORD and fields - * with REPEATABLE mode. - * - * Generated from protobuf field double distinct_ratio = 3; - */ - protected $distinct_ratio = 0.0; - /** - * The list of top N non-null values, frequency and ratio with which - * they occur in the scanned data. N is 10 or equal to the number of - * distinct values in the field, whichever is smaller. Not available for - * complex non-groupable field type RECORD and fields with REPEATABLE - * mode. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue top_n_values = 4; - */ - private $top_n_values; - protected $field_info; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $null_ratio - * Ratio of rows with null value against total scanned rows. - * @type float $distinct_ratio - * Ratio of rows with distinct values against total scanned rows. - * Not available for complex non-groupable field type RECORD and fields - * with REPEATABLE mode. - * @type array<\Google\Cloud\Dataplex\V1\DataProfileResult\Profile\Field\ProfileInfo\TopNValue>|\Google\Protobuf\Internal\RepeatedField $top_n_values - * The list of top N non-null values, frequency and ratio with which - * they occur in the scanned data. N is 10 or equal to the number of - * distinct values in the field, whichever is smaller. Not available for - * complex non-groupable field type RECORD and fields with REPEATABLE - * mode. - * @type \Google\Cloud\Dataplex\V1\DataProfileResult\Profile\Field\ProfileInfo\StringFieldInfo $string_profile - * String type field information. - * @type \Google\Cloud\Dataplex\V1\DataProfileResult\Profile\Field\ProfileInfo\IntegerFieldInfo $integer_profile - * Integer type field information. - * @type \Google\Cloud\Dataplex\V1\DataProfileResult\Profile\Field\ProfileInfo\DoubleFieldInfo $double_profile - * Double type field information. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataProfile::initOnce(); - parent::__construct($data); - } - - /** - * Ratio of rows with null value against total scanned rows. - * - * Generated from protobuf field double null_ratio = 2; - * @return float - */ - public function getNullRatio() - { - return $this->null_ratio; - } - - /** - * Ratio of rows with null value against total scanned rows. - * - * Generated from protobuf field double null_ratio = 2; - * @param float $var - * @return $this - */ - public function setNullRatio($var) - { - GPBUtil::checkDouble($var); - $this->null_ratio = $var; - - return $this; - } - - /** - * Ratio of rows with distinct values against total scanned rows. - * Not available for complex non-groupable field type RECORD and fields - * with REPEATABLE mode. - * - * Generated from protobuf field double distinct_ratio = 3; - * @return float - */ - public function getDistinctRatio() - { - return $this->distinct_ratio; - } - - /** - * Ratio of rows with distinct values against total scanned rows. - * Not available for complex non-groupable field type RECORD and fields - * with REPEATABLE mode. - * - * Generated from protobuf field double distinct_ratio = 3; - * @param float $var - * @return $this - */ - public function setDistinctRatio($var) - { - GPBUtil::checkDouble($var); - $this->distinct_ratio = $var; - - return $this; - } - - /** - * The list of top N non-null values, frequency and ratio with which - * they occur in the scanned data. N is 10 or equal to the number of - * distinct values in the field, whichever is smaller. Not available for - * complex non-groupable field type RECORD and fields with REPEATABLE - * mode. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue top_n_values = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTopNValues() - { - return $this->top_n_values; - } - - /** - * The list of top N non-null values, frequency and ratio with which - * they occur in the scanned data. N is 10 or equal to the number of - * distinct values in the field, whichever is smaller. Not available for - * complex non-groupable field type RECORD and fields with REPEATABLE - * mode. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue top_n_values = 4; - * @param array<\Google\Cloud\Dataplex\V1\DataProfileResult\Profile\Field\ProfileInfo\TopNValue>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTopNValues($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\DataProfileResult\Profile\Field\ProfileInfo\TopNValue::class); - $this->top_n_values = $arr; - - return $this; - } - - /** - * String type field information. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo string_profile = 101; - * @return \Google\Cloud\Dataplex\V1\DataProfileResult\Profile\Field\ProfileInfo\StringFieldInfo|null - */ - public function getStringProfile() - { - return $this->readOneof(101); - } - - public function hasStringProfile() - { - return $this->hasOneof(101); - } - - /** - * String type field information. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo string_profile = 101; - * @param \Google\Cloud\Dataplex\V1\DataProfileResult\Profile\Field\ProfileInfo\StringFieldInfo $var - * @return $this - */ - public function setStringProfile($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataProfileResult\Profile\Field\ProfileInfo\StringFieldInfo::class); - $this->writeOneof(101, $var); - - return $this; - } - - /** - * Integer type field information. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo integer_profile = 102; - * @return \Google\Cloud\Dataplex\V1\DataProfileResult\Profile\Field\ProfileInfo\IntegerFieldInfo|null - */ - public function getIntegerProfile() - { - return $this->readOneof(102); - } - - public function hasIntegerProfile() - { - return $this->hasOneof(102); - } - - /** - * Integer type field information. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo integer_profile = 102; - * @param \Google\Cloud\Dataplex\V1\DataProfileResult\Profile\Field\ProfileInfo\IntegerFieldInfo $var - * @return $this - */ - public function setIntegerProfile($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataProfileResult\Profile\Field\ProfileInfo\IntegerFieldInfo::class); - $this->writeOneof(102, $var); - - return $this; - } - - /** - * Double type field information. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo double_profile = 103; - * @return \Google\Cloud\Dataplex\V1\DataProfileResult\Profile\Field\ProfileInfo\DoubleFieldInfo|null - */ - public function getDoubleProfile() - { - return $this->readOneof(103); - } - - public function hasDoubleProfile() - { - return $this->hasOneof(103); - } - - /** - * Double type field information. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo double_profile = 103; - * @param \Google\Cloud\Dataplex\V1\DataProfileResult\Profile\Field\ProfileInfo\DoubleFieldInfo $var - * @return $this - */ - public function setDoubleProfile($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataProfileResult\Profile\Field\ProfileInfo\DoubleFieldInfo::class); - $this->writeOneof(103, $var); - - return $this; - } - - /** - * @return string - */ - public function getFieldInfo() - { - return $this->whichOneof("field_info"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ProfileInfo::class, \Google\Cloud\Dataplex\V1\DataProfileResult_Profile_Field_ProfileInfo::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/Profile/Field/ProfileInfo/DoubleFieldInfo.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/Profile/Field/ProfileInfo/DoubleFieldInfo.php deleted file mode 100644 index ad1f6ba21fdd..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/Profile/Field/ProfileInfo/DoubleFieldInfo.php +++ /dev/null @@ -1,262 +0,0 @@ -google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.DoubleFieldInfo - */ -class DoubleFieldInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Average of non-null values in the scanned data. NaN, if the field - * has a NaN. - * - * Generated from protobuf field double average = 1; - */ - protected $average = 0.0; - /** - * Standard deviation of non-null values in the scanned data. NaN, if - * the field has a NaN. - * - * Generated from protobuf field double standard_deviation = 3; - */ - protected $standard_deviation = 0.0; - /** - * Minimum of non-null values in the scanned data. NaN, if the field - * has a NaN. - * - * Generated from protobuf field double min = 4; - */ - protected $min = 0.0; - /** - * A quartile divides the number of data points into four parts, or - * quarters, of more-or-less equal size. Three main quartiles used - * are: The first quartile (Q1) splits off the lowest 25% of data from - * the highest 75%. It is also known as the lower or 25th empirical - * quartile, as 25% of the data is below this point. The second - * quartile (Q2) is the median of a data set. So, 50% of the data lies - * below this point. The third quartile (Q3) splits off the highest - * 25% of data from the lowest 75%. It is known as the upper or 75th - * empirical quartile, as 75% of the data lies below this point. - * Here, the quartiles is provided as an ordered list of quartile - * values for the scanned data, occurring in order Q1, median, Q3. - * - * Generated from protobuf field repeated double quartiles = 6; - */ - private $quartiles; - /** - * Maximum of non-null values in the scanned data. NaN, if the field - * has a NaN. - * - * Generated from protobuf field double max = 5; - */ - protected $max = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $average - * Average of non-null values in the scanned data. NaN, if the field - * has a NaN. - * @type float $standard_deviation - * Standard deviation of non-null values in the scanned data. NaN, if - * the field has a NaN. - * @type float $min - * Minimum of non-null values in the scanned data. NaN, if the field - * has a NaN. - * @type array|\Google\Protobuf\Internal\RepeatedField $quartiles - * A quartile divides the number of data points into four parts, or - * quarters, of more-or-less equal size. Three main quartiles used - * are: The first quartile (Q1) splits off the lowest 25% of data from - * the highest 75%. It is also known as the lower or 25th empirical - * quartile, as 25% of the data is below this point. The second - * quartile (Q2) is the median of a data set. So, 50% of the data lies - * below this point. The third quartile (Q3) splits off the highest - * 25% of data from the lowest 75%. It is known as the upper or 75th - * empirical quartile, as 75% of the data lies below this point. - * Here, the quartiles is provided as an ordered list of quartile - * values for the scanned data, occurring in order Q1, median, Q3. - * @type float $max - * Maximum of non-null values in the scanned data. NaN, if the field - * has a NaN. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataProfile::initOnce(); - parent::__construct($data); - } - - /** - * Average of non-null values in the scanned data. NaN, if the field - * has a NaN. - * - * Generated from protobuf field double average = 1; - * @return float - */ - public function getAverage() - { - return $this->average; - } - - /** - * Average of non-null values in the scanned data. NaN, if the field - * has a NaN. - * - * Generated from protobuf field double average = 1; - * @param float $var - * @return $this - */ - public function setAverage($var) - { - GPBUtil::checkDouble($var); - $this->average = $var; - - return $this; - } - - /** - * Standard deviation of non-null values in the scanned data. NaN, if - * the field has a NaN. - * - * Generated from protobuf field double standard_deviation = 3; - * @return float - */ - public function getStandardDeviation() - { - return $this->standard_deviation; - } - - /** - * Standard deviation of non-null values in the scanned data. NaN, if - * the field has a NaN. - * - * Generated from protobuf field double standard_deviation = 3; - * @param float $var - * @return $this - */ - public function setStandardDeviation($var) - { - GPBUtil::checkDouble($var); - $this->standard_deviation = $var; - - return $this; - } - - /** - * Minimum of non-null values in the scanned data. NaN, if the field - * has a NaN. - * - * Generated from protobuf field double min = 4; - * @return float - */ - public function getMin() - { - return $this->min; - } - - /** - * Minimum of non-null values in the scanned data. NaN, if the field - * has a NaN. - * - * Generated from protobuf field double min = 4; - * @param float $var - * @return $this - */ - public function setMin($var) - { - GPBUtil::checkDouble($var); - $this->min = $var; - - return $this; - } - - /** - * A quartile divides the number of data points into four parts, or - * quarters, of more-or-less equal size. Three main quartiles used - * are: The first quartile (Q1) splits off the lowest 25% of data from - * the highest 75%. It is also known as the lower or 25th empirical - * quartile, as 25% of the data is below this point. The second - * quartile (Q2) is the median of a data set. So, 50% of the data lies - * below this point. The third quartile (Q3) splits off the highest - * 25% of data from the lowest 75%. It is known as the upper or 75th - * empirical quartile, as 75% of the data lies below this point. - * Here, the quartiles is provided as an ordered list of quartile - * values for the scanned data, occurring in order Q1, median, Q3. - * - * Generated from protobuf field repeated double quartiles = 6; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getQuartiles() - { - return $this->quartiles; - } - - /** - * A quartile divides the number of data points into four parts, or - * quarters, of more-or-less equal size. Three main quartiles used - * are: The first quartile (Q1) splits off the lowest 25% of data from - * the highest 75%. It is also known as the lower or 25th empirical - * quartile, as 25% of the data is below this point. The second - * quartile (Q2) is the median of a data set. So, 50% of the data lies - * below this point. The third quartile (Q3) splits off the highest - * 25% of data from the lowest 75%. It is known as the upper or 75th - * empirical quartile, as 75% of the data lies below this point. - * Here, the quartiles is provided as an ordered list of quartile - * values for the scanned data, occurring in order Q1, median, Q3. - * - * Generated from protobuf field repeated double quartiles = 6; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setQuartiles($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::DOUBLE); - $this->quartiles = $arr; - - return $this; - } - - /** - * Maximum of non-null values in the scanned data. NaN, if the field - * has a NaN. - * - * Generated from protobuf field double max = 5; - * @return float - */ - public function getMax() - { - return $this->max; - } - - /** - * Maximum of non-null values in the scanned data. NaN, if the field - * has a NaN. - * - * Generated from protobuf field double max = 5; - * @param float $var - * @return $this - */ - public function setMax($var) - { - GPBUtil::checkDouble($var); - $this->max = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DoubleFieldInfo::class, \Google\Cloud\Dataplex\V1\DataProfileResult_Profile_Field_ProfileInfo_DoubleFieldInfo::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/Profile/Field/ProfileInfo/IntegerFieldInfo.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/Profile/Field/ProfileInfo/IntegerFieldInfo.php deleted file mode 100644 index c0cfc703d405..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/Profile/Field/ProfileInfo/IntegerFieldInfo.php +++ /dev/null @@ -1,266 +0,0 @@ -google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.IntegerFieldInfo - */ -class IntegerFieldInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Average of non-null values in the scanned data. NaN, if the field - * has a NaN. - * - * Generated from protobuf field double average = 1; - */ - protected $average = 0.0; - /** - * Standard deviation of non-null values in the scanned data. NaN, if - * the field has a NaN. - * - * Generated from protobuf field double standard_deviation = 3; - */ - protected $standard_deviation = 0.0; - /** - * Minimum of non-null values in the scanned data. NaN, if the field - * has a NaN. - * - * Generated from protobuf field int64 min = 4; - */ - protected $min = 0; - /** - * A quartile divides the number of data points into four parts, or - * quarters, of more-or-less equal size. Three main quartiles used - * are: The first quartile (Q1) splits off the lowest 25% of data from - * the highest 75%. It is also known as the lower or 25th empirical - * quartile, as 25% of the data is below this point. The second - * quartile (Q2) is the median of a data set. So, 50% of the data lies - * below this point. The third quartile (Q3) splits off the highest - * 25% of data from the lowest 75%. It is known as the upper or 75th - * empirical quartile, as 75% of the data lies below this point. - * Here, the quartiles is provided as an ordered list of approximate - * quartile values for the scanned data, occurring in order Q1, - * median, Q3. - * - * Generated from protobuf field repeated int64 quartiles = 6; - */ - private $quartiles; - /** - * Maximum of non-null values in the scanned data. NaN, if the field - * has a NaN. - * - * Generated from protobuf field int64 max = 5; - */ - protected $max = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $average - * Average of non-null values in the scanned data. NaN, if the field - * has a NaN. - * @type float $standard_deviation - * Standard deviation of non-null values in the scanned data. NaN, if - * the field has a NaN. - * @type int|string $min - * Minimum of non-null values in the scanned data. NaN, if the field - * has a NaN. - * @type array|array|\Google\Protobuf\Internal\RepeatedField $quartiles - * A quartile divides the number of data points into four parts, or - * quarters, of more-or-less equal size. Three main quartiles used - * are: The first quartile (Q1) splits off the lowest 25% of data from - * the highest 75%. It is also known as the lower or 25th empirical - * quartile, as 25% of the data is below this point. The second - * quartile (Q2) is the median of a data set. So, 50% of the data lies - * below this point. The third quartile (Q3) splits off the highest - * 25% of data from the lowest 75%. It is known as the upper or 75th - * empirical quartile, as 75% of the data lies below this point. - * Here, the quartiles is provided as an ordered list of approximate - * quartile values for the scanned data, occurring in order Q1, - * median, Q3. - * @type int|string $max - * Maximum of non-null values in the scanned data. NaN, if the field - * has a NaN. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataProfile::initOnce(); - parent::__construct($data); - } - - /** - * Average of non-null values in the scanned data. NaN, if the field - * has a NaN. - * - * Generated from protobuf field double average = 1; - * @return float - */ - public function getAverage() - { - return $this->average; - } - - /** - * Average of non-null values in the scanned data. NaN, if the field - * has a NaN. - * - * Generated from protobuf field double average = 1; - * @param float $var - * @return $this - */ - public function setAverage($var) - { - GPBUtil::checkDouble($var); - $this->average = $var; - - return $this; - } - - /** - * Standard deviation of non-null values in the scanned data. NaN, if - * the field has a NaN. - * - * Generated from protobuf field double standard_deviation = 3; - * @return float - */ - public function getStandardDeviation() - { - return $this->standard_deviation; - } - - /** - * Standard deviation of non-null values in the scanned data. NaN, if - * the field has a NaN. - * - * Generated from protobuf field double standard_deviation = 3; - * @param float $var - * @return $this - */ - public function setStandardDeviation($var) - { - GPBUtil::checkDouble($var); - $this->standard_deviation = $var; - - return $this; - } - - /** - * Minimum of non-null values in the scanned data. NaN, if the field - * has a NaN. - * - * Generated from protobuf field int64 min = 4; - * @return int|string - */ - public function getMin() - { - return $this->min; - } - - /** - * Minimum of non-null values in the scanned data. NaN, if the field - * has a NaN. - * - * Generated from protobuf field int64 min = 4; - * @param int|string $var - * @return $this - */ - public function setMin($var) - { - GPBUtil::checkInt64($var); - $this->min = $var; - - return $this; - } - - /** - * A quartile divides the number of data points into four parts, or - * quarters, of more-or-less equal size. Three main quartiles used - * are: The first quartile (Q1) splits off the lowest 25% of data from - * the highest 75%. It is also known as the lower or 25th empirical - * quartile, as 25% of the data is below this point. The second - * quartile (Q2) is the median of a data set. So, 50% of the data lies - * below this point. The third quartile (Q3) splits off the highest - * 25% of data from the lowest 75%. It is known as the upper or 75th - * empirical quartile, as 75% of the data lies below this point. - * Here, the quartiles is provided as an ordered list of approximate - * quartile values for the scanned data, occurring in order Q1, - * median, Q3. - * - * Generated from protobuf field repeated int64 quartiles = 6; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getQuartiles() - { - return $this->quartiles; - } - - /** - * A quartile divides the number of data points into four parts, or - * quarters, of more-or-less equal size. Three main quartiles used - * are: The first quartile (Q1) splits off the lowest 25% of data from - * the highest 75%. It is also known as the lower or 25th empirical - * quartile, as 25% of the data is below this point. The second - * quartile (Q2) is the median of a data set. So, 50% of the data lies - * below this point. The third quartile (Q3) splits off the highest - * 25% of data from the lowest 75%. It is known as the upper or 75th - * empirical quartile, as 75% of the data lies below this point. - * Here, the quartiles is provided as an ordered list of approximate - * quartile values for the scanned data, occurring in order Q1, - * median, Q3. - * - * Generated from protobuf field repeated int64 quartiles = 6; - * @param array|array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setQuartiles($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT64); - $this->quartiles = $arr; - - return $this; - } - - /** - * Maximum of non-null values in the scanned data. NaN, if the field - * has a NaN. - * - * Generated from protobuf field int64 max = 5; - * @return int|string - */ - public function getMax() - { - return $this->max; - } - - /** - * Maximum of non-null values in the scanned data. NaN, if the field - * has a NaN. - * - * Generated from protobuf field int64 max = 5; - * @param int|string $var - * @return $this - */ - public function setMax($var) - { - GPBUtil::checkInt64($var); - $this->max = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(IntegerFieldInfo::class, \Google\Cloud\Dataplex\V1\DataProfileResult_Profile_Field_ProfileInfo_IntegerFieldInfo::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/Profile/Field/ProfileInfo/StringFieldInfo.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/Profile/Field/ProfileInfo/StringFieldInfo.php deleted file mode 100644 index b1dc69020a8f..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/Profile/Field/ProfileInfo/StringFieldInfo.php +++ /dev/null @@ -1,138 +0,0 @@ -google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.StringFieldInfo - */ -class StringFieldInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Minimum length of non-null values in the scanned data. - * - * Generated from protobuf field int64 min_length = 1; - */ - protected $min_length = 0; - /** - * Maximum length of non-null values in the scanned data. - * - * Generated from protobuf field int64 max_length = 2; - */ - protected $max_length = 0; - /** - * Average length of non-null values in the scanned data. - * - * Generated from protobuf field double average_length = 3; - */ - protected $average_length = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $min_length - * Minimum length of non-null values in the scanned data. - * @type int|string $max_length - * Maximum length of non-null values in the scanned data. - * @type float $average_length - * Average length of non-null values in the scanned data. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataProfile::initOnce(); - parent::__construct($data); - } - - /** - * Minimum length of non-null values in the scanned data. - * - * Generated from protobuf field int64 min_length = 1; - * @return int|string - */ - public function getMinLength() - { - return $this->min_length; - } - - /** - * Minimum length of non-null values in the scanned data. - * - * Generated from protobuf field int64 min_length = 1; - * @param int|string $var - * @return $this - */ - public function setMinLength($var) - { - GPBUtil::checkInt64($var); - $this->min_length = $var; - - return $this; - } - - /** - * Maximum length of non-null values in the scanned data. - * - * Generated from protobuf field int64 max_length = 2; - * @return int|string - */ - public function getMaxLength() - { - return $this->max_length; - } - - /** - * Maximum length of non-null values in the scanned data. - * - * Generated from protobuf field int64 max_length = 2; - * @param int|string $var - * @return $this - */ - public function setMaxLength($var) - { - GPBUtil::checkInt64($var); - $this->max_length = $var; - - return $this; - } - - /** - * Average length of non-null values in the scanned data. - * - * Generated from protobuf field double average_length = 3; - * @return float - */ - public function getAverageLength() - { - return $this->average_length; - } - - /** - * Average length of non-null values in the scanned data. - * - * Generated from protobuf field double average_length = 3; - * @param float $var - * @return $this - */ - public function setAverageLength($var) - { - GPBUtil::checkDouble($var); - $this->average_length = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(StringFieldInfo::class, \Google\Cloud\Dataplex\V1\DataProfileResult_Profile_Field_ProfileInfo_StringFieldInfo::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/Profile/Field/ProfileInfo/TopNValue.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/Profile/Field/ProfileInfo/TopNValue.php deleted file mode 100644 index 52c084f07d58..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileResult/Profile/Field/ProfileInfo/TopNValue.php +++ /dev/null @@ -1,142 +0,0 @@ -google.cloud.dataplex.v1.DataProfileResult.Profile.Field.ProfileInfo.TopNValue - */ -class TopNValue extends \Google\Protobuf\Internal\Message -{ - /** - * String value of a top N non-null value. - * - * Generated from protobuf field string value = 1; - */ - protected $value = ''; - /** - * Count of the corresponding value in the scanned data. - * - * Generated from protobuf field int64 count = 2; - */ - protected $count = 0; - /** - * Ratio of the corresponding value in the field against the total - * number of rows in the scanned data. - * - * Generated from protobuf field double ratio = 3; - */ - protected $ratio = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $value - * String value of a top N non-null value. - * @type int|string $count - * Count of the corresponding value in the scanned data. - * @type float $ratio - * Ratio of the corresponding value in the field against the total - * number of rows in the scanned data. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataProfile::initOnce(); - parent::__construct($data); - } - - /** - * String value of a top N non-null value. - * - * Generated from protobuf field string value = 1; - * @return string - */ - public function getValue() - { - return $this->value; - } - - /** - * String value of a top N non-null value. - * - * Generated from protobuf field string value = 1; - * @param string $var - * @return $this - */ - public function setValue($var) - { - GPBUtil::checkString($var, True); - $this->value = $var; - - return $this; - } - - /** - * Count of the corresponding value in the scanned data. - * - * Generated from protobuf field int64 count = 2; - * @return int|string - */ - public function getCount() - { - return $this->count; - } - - /** - * Count of the corresponding value in the scanned data. - * - * Generated from protobuf field int64 count = 2; - * @param int|string $var - * @return $this - */ - public function setCount($var) - { - GPBUtil::checkInt64($var); - $this->count = $var; - - return $this; - } - - /** - * Ratio of the corresponding value in the field against the total - * number of rows in the scanned data. - * - * Generated from protobuf field double ratio = 3; - * @return float - */ - public function getRatio() - { - return $this->ratio; - } - - /** - * Ratio of the corresponding value in the field against the total - * number of rows in the scanned data. - * - * Generated from protobuf field double ratio = 3; - * @param float $var - * @return $this - */ - public function setRatio($var) - { - GPBUtil::checkDouble($var); - $this->ratio = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(TopNValue::class, \Google\Cloud\Dataplex\V1\DataProfileResult_Profile_Field_ProfileInfo_TopNValue::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileSpec.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileSpec.php deleted file mode 100644 index 9451a8623510..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileSpec.php +++ /dev/null @@ -1,281 +0,0 @@ -google.cloud.dataplex.v1.DataProfileSpec - */ -class DataProfileSpec extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The percentage of the records to be selected from the dataset for - * DataScan. - * * Value can range between 0.0 and 100.0 with up to 3 significant decimal - * digits. - * * Sampling is not applied if `sampling_percent` is not specified, 0 or - * 100. - * - * Generated from protobuf field float sampling_percent = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $sampling_percent = 0.0; - /** - * Optional. A filter applied to all rows in a single DataScan job. - * The filter needs to be a valid SQL expression for a WHERE clause in - * BigQuery standard SQL syntax. - * Example: col1 >= 0 AND col2 < 10 - * - * Generated from protobuf field string row_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $row_filter = ''; - /** - * Optional. Actions to take upon job completion.. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileSpec.PostScanActions post_scan_actions = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $post_scan_actions = null; - /** - * Optional. The fields to include in data profile. - * If not specified, all fields at the time of profile scan job execution are - * included, except for ones listed in `exclude_fields`. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileSpec.SelectedFields include_fields = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $include_fields = null; - /** - * Optional. The fields to exclude from data profile. - * If specified, the fields will be excluded from data profile, regardless of - * `include_fields` value. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileSpec.SelectedFields exclude_fields = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $exclude_fields = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $sampling_percent - * Optional. The percentage of the records to be selected from the dataset for - * DataScan. - * * Value can range between 0.0 and 100.0 with up to 3 significant decimal - * digits. - * * Sampling is not applied if `sampling_percent` is not specified, 0 or - * 100. - * @type string $row_filter - * Optional. A filter applied to all rows in a single DataScan job. - * The filter needs to be a valid SQL expression for a WHERE clause in - * BigQuery standard SQL syntax. - * Example: col1 >= 0 AND col2 < 10 - * @type \Google\Cloud\Dataplex\V1\DataProfileSpec\PostScanActions $post_scan_actions - * Optional. Actions to take upon job completion.. - * @type \Google\Cloud\Dataplex\V1\DataProfileSpec\SelectedFields $include_fields - * Optional. The fields to include in data profile. - * If not specified, all fields at the time of profile scan job execution are - * included, except for ones listed in `exclude_fields`. - * @type \Google\Cloud\Dataplex\V1\DataProfileSpec\SelectedFields $exclude_fields - * Optional. The fields to exclude from data profile. - * If specified, the fields will be excluded from data profile, regardless of - * `include_fields` value. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataProfile::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The percentage of the records to be selected from the dataset for - * DataScan. - * * Value can range between 0.0 and 100.0 with up to 3 significant decimal - * digits. - * * Sampling is not applied if `sampling_percent` is not specified, 0 or - * 100. - * - * Generated from protobuf field float sampling_percent = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return float - */ - public function getSamplingPercent() - { - return $this->sampling_percent; - } - - /** - * Optional. The percentage of the records to be selected from the dataset for - * DataScan. - * * Value can range between 0.0 and 100.0 with up to 3 significant decimal - * digits. - * * Sampling is not applied if `sampling_percent` is not specified, 0 or - * 100. - * - * Generated from protobuf field float sampling_percent = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param float $var - * @return $this - */ - public function setSamplingPercent($var) - { - GPBUtil::checkFloat($var); - $this->sampling_percent = $var; - - return $this; - } - - /** - * Optional. A filter applied to all rows in a single DataScan job. - * The filter needs to be a valid SQL expression for a WHERE clause in - * BigQuery standard SQL syntax. - * Example: col1 >= 0 AND col2 < 10 - * - * Generated from protobuf field string row_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRowFilter() - { - return $this->row_filter; - } - - /** - * Optional. A filter applied to all rows in a single DataScan job. - * The filter needs to be a valid SQL expression for a WHERE clause in - * BigQuery standard SQL syntax. - * Example: col1 >= 0 AND col2 < 10 - * - * Generated from protobuf field string row_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRowFilter($var) - { - GPBUtil::checkString($var, True); - $this->row_filter = $var; - - return $this; - } - - /** - * Optional. Actions to take upon job completion.. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileSpec.PostScanActions post_scan_actions = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataplex\V1\DataProfileSpec\PostScanActions|null - */ - public function getPostScanActions() - { - return $this->post_scan_actions; - } - - public function hasPostScanActions() - { - return isset($this->post_scan_actions); - } - - public function clearPostScanActions() - { - unset($this->post_scan_actions); - } - - /** - * Optional. Actions to take upon job completion.. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileSpec.PostScanActions post_scan_actions = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataplex\V1\DataProfileSpec\PostScanActions $var - * @return $this - */ - public function setPostScanActions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataProfileSpec\PostScanActions::class); - $this->post_scan_actions = $var; - - return $this; - } - - /** - * Optional. The fields to include in data profile. - * If not specified, all fields at the time of profile scan job execution are - * included, except for ones listed in `exclude_fields`. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileSpec.SelectedFields include_fields = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataplex\V1\DataProfileSpec\SelectedFields|null - */ - public function getIncludeFields() - { - return $this->include_fields; - } - - public function hasIncludeFields() - { - return isset($this->include_fields); - } - - public function clearIncludeFields() - { - unset($this->include_fields); - } - - /** - * Optional. The fields to include in data profile. - * If not specified, all fields at the time of profile scan job execution are - * included, except for ones listed in `exclude_fields`. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileSpec.SelectedFields include_fields = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataplex\V1\DataProfileSpec\SelectedFields $var - * @return $this - */ - public function setIncludeFields($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataProfileSpec\SelectedFields::class); - $this->include_fields = $var; - - return $this; - } - - /** - * Optional. The fields to exclude from data profile. - * If specified, the fields will be excluded from data profile, regardless of - * `include_fields` value. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileSpec.SelectedFields exclude_fields = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataplex\V1\DataProfileSpec\SelectedFields|null - */ - public function getExcludeFields() - { - return $this->exclude_fields; - } - - public function hasExcludeFields() - { - return isset($this->exclude_fields); - } - - public function clearExcludeFields() - { - unset($this->exclude_fields); - } - - /** - * Optional. The fields to exclude from data profile. - * If specified, the fields will be excluded from data profile, regardless of - * `include_fields` value. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileSpec.SelectedFields exclude_fields = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataplex\V1\DataProfileSpec\SelectedFields $var - * @return $this - */ - public function setExcludeFields($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataProfileSpec\SelectedFields::class); - $this->exclude_fields = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileSpec/PostScanActions.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileSpec/PostScanActions.php deleted file mode 100644 index c6c1e01f3466..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileSpec/PostScanActions.php +++ /dev/null @@ -1,84 +0,0 @@ -google.cloud.dataplex.v1.DataProfileSpec.PostScanActions - */ -class PostScanActions extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. If set, results will be exported to the provided BigQuery - * table. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport bigquery_export = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $bigquery_export = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dataplex\V1\DataProfileSpec\PostScanActions\BigQueryExport $bigquery_export - * Optional. If set, results will be exported to the provided BigQuery - * table. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataProfile::initOnce(); - parent::__construct($data); - } - - /** - * Optional. If set, results will be exported to the provided BigQuery - * table. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport bigquery_export = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataplex\V1\DataProfileSpec\PostScanActions\BigQueryExport|null - */ - public function getBigqueryExport() - { - return $this->bigquery_export; - } - - public function hasBigqueryExport() - { - return isset($this->bigquery_export); - } - - public function clearBigqueryExport() - { - unset($this->bigquery_export); - } - - /** - * Optional. If set, results will be exported to the provided BigQuery - * table. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport bigquery_export = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataplex\V1\DataProfileSpec\PostScanActions\BigQueryExport $var - * @return $this - */ - public function setBigqueryExport($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataProfileSpec\PostScanActions\BigQueryExport::class); - $this->bigquery_export = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(PostScanActions::class, \Google\Cloud\Dataplex\V1\DataProfileSpec_PostScanActions::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileSpec/PostScanActions/BigQueryExport.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileSpec/PostScanActions/BigQueryExport.php deleted file mode 100644 index 55cc182ed0f5..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileSpec/PostScanActions/BigQueryExport.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport - */ -class BigQueryExport extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The BigQuery table to export DataProfileScan results to. - * Format: - * //bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID - * - * Generated from protobuf field string results_table = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $results_table = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $results_table - * Optional. The BigQuery table to export DataProfileScan results to. - * Format: - * //bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataProfile::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The BigQuery table to export DataProfileScan results to. - * Format: - * //bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID - * - * Generated from protobuf field string results_table = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getResultsTable() - { - return $this->results_table; - } - - /** - * Optional. The BigQuery table to export DataProfileScan results to. - * Format: - * //bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID - * - * Generated from protobuf field string results_table = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setResultsTable($var) - { - GPBUtil::checkString($var, True); - $this->results_table = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(BigQueryExport::class, \Google\Cloud\Dataplex\V1\DataProfileSpec_PostScanActions_BigQueryExport::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileSpec/SelectedFields.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileSpec/SelectedFields.php deleted file mode 100644 index f69dc8885de9..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataProfileSpec/SelectedFields.php +++ /dev/null @@ -1,90 +0,0 @@ -google.cloud.dataplex.v1.DataProfileSpec.SelectedFields - */ -class SelectedFields extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Expected input is a list of fully qualified names of fields as - * in the schema. - * Only top-level field names for nested fields are supported. - * For instance, if 'x' is of nested field type, listing 'x' is supported - * but 'x.y.z' is not supported. Here 'y' and 'y.z' are nested fields of - * 'x'. - * - * Generated from protobuf field repeated string field_names = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $field_names; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $field_names - * Optional. Expected input is a list of fully qualified names of fields as - * in the schema. - * Only top-level field names for nested fields are supported. - * For instance, if 'x' is of nested field type, listing 'x' is supported - * but 'x.y.z' is not supported. Here 'y' and 'y.z' are nested fields of - * 'x'. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataProfile::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Expected input is a list of fully qualified names of fields as - * in the schema. - * Only top-level field names for nested fields are supported. - * For instance, if 'x' is of nested field type, listing 'x' is supported - * but 'x.y.z' is not supported. Here 'y' and 'y.z' are nested fields of - * 'x'. - * - * Generated from protobuf field repeated string field_names = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFieldNames() - { - return $this->field_names; - } - - /** - * Optional. Expected input is a list of fully qualified names of fields as - * in the schema. - * Only top-level field names for nested fields are supported. - * For instance, if 'x' is of nested field type, listing 'x' is supported - * but 'x.y.z' is not supported. Here 'y' and 'y.z' are nested fields of - * 'x'. - * - * Generated from protobuf field repeated string field_names = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFieldNames($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->field_names = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SelectedFields::class, \Google\Cloud\Dataplex\V1\DataProfileSpec_SelectedFields::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityColumnResult.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityColumnResult.php deleted file mode 100644 index 7ae5f505d5b6..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityColumnResult.php +++ /dev/null @@ -1,124 +0,0 @@ -google.cloud.dataplex.v1.DataQualityColumnResult - */ -class DataQualityColumnResult extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The column specified in the DataQualityRule. - * - * Generated from protobuf field string column = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $column = ''; - /** - * Output only. The column-level data quality score for this data scan job if - * and only if the 'column' field is set. - * The score ranges between between [0, 100] (up to two decimal - * points). - * - * Generated from protobuf field optional float score = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $score = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $column - * Output only. The column specified in the DataQualityRule. - * @type float $score - * Output only. The column-level data quality score for this data scan job if - * and only if the 'column' field is set. - * The score ranges between between [0, 100] (up to two decimal - * points). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataQuality::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The column specified in the DataQualityRule. - * - * Generated from protobuf field string column = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getColumn() - { - return $this->column; - } - - /** - * Output only. The column specified in the DataQualityRule. - * - * Generated from protobuf field string column = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setColumn($var) - { - GPBUtil::checkString($var, True); - $this->column = $var; - - return $this; - } - - /** - * Output only. The column-level data quality score for this data scan job if - * and only if the 'column' field is set. - * The score ranges between between [0, 100] (up to two decimal - * points). - * - * Generated from protobuf field optional float score = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return float - */ - public function getScore() - { - return isset($this->score) ? $this->score : 0.0; - } - - public function hasScore() - { - return isset($this->score); - } - - public function clearScore() - { - unset($this->score); - } - - /** - * Output only. The column-level data quality score for this data scan job if - * and only if the 'column' field is set. - * The score ranges between between [0, 100] (up to two decimal - * points). - * - * Generated from protobuf field optional float score = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param float $var - * @return $this - */ - public function setScore($var) - { - GPBUtil::checkFloat($var); - $this->score = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityDimension.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityDimension.php deleted file mode 100644 index dbc14cbdc2de..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityDimension.php +++ /dev/null @@ -1,76 +0,0 @@ -google.cloud.dataplex.v1.DataQualityDimension - */ -class DataQualityDimension extends \Google\Protobuf\Internal\Message -{ - /** - * The dimension name a rule belongs to. Supported dimensions are - * ["COMPLETENESS", "ACCURACY", "CONSISTENCY", "VALIDITY", "UNIQUENESS", - * "INTEGRITY"] - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The dimension name a rule belongs to. Supported dimensions are - * ["COMPLETENESS", "ACCURACY", "CONSISTENCY", "VALIDITY", "UNIQUENESS", - * "INTEGRITY"] - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataQuality::initOnce(); - parent::__construct($data); - } - - /** - * The dimension name a rule belongs to. Supported dimensions are - * ["COMPLETENESS", "ACCURACY", "CONSISTENCY", "VALIDITY", "UNIQUENESS", - * "INTEGRITY"] - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The dimension name a rule belongs to. Supported dimensions are - * ["COMPLETENESS", "ACCURACY", "CONSISTENCY", "VALIDITY", "UNIQUENESS", - * "INTEGRITY"] - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityDimensionResult.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityDimensionResult.php deleted file mode 100644 index 5f9a689db9f9..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityDimensionResult.php +++ /dev/null @@ -1,168 +0,0 @@ -google.cloud.dataplex.v1.DataQualityDimensionResult - */ -class DataQualityDimensionResult extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The dimension config specified in the DataQualitySpec, as is. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityDimension dimension = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $dimension = null; - /** - * Whether the dimension passed or failed. - * - * Generated from protobuf field bool passed = 3; - */ - protected $passed = false; - /** - * Output only. The dimension-level data quality score for this data scan job - * if and only if the 'dimension' field is set. - * The score ranges between [0, 100] (up to two decimal - * points). - * - * Generated from protobuf field optional float score = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $score = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dataplex\V1\DataQualityDimension $dimension - * Output only. The dimension config specified in the DataQualitySpec, as is. - * @type bool $passed - * Whether the dimension passed or failed. - * @type float $score - * Output only. The dimension-level data quality score for this data scan job - * if and only if the 'dimension' field is set. - * The score ranges between [0, 100] (up to two decimal - * points). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataQuality::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The dimension config specified in the DataQualitySpec, as is. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityDimension dimension = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Dataplex\V1\DataQualityDimension|null - */ - public function getDimension() - { - return $this->dimension; - } - - public function hasDimension() - { - return isset($this->dimension); - } - - public function clearDimension() - { - unset($this->dimension); - } - - /** - * Output only. The dimension config specified in the DataQualitySpec, as is. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityDimension dimension = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Dataplex\V1\DataQualityDimension $var - * @return $this - */ - public function setDimension($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataQualityDimension::class); - $this->dimension = $var; - - return $this; - } - - /** - * Whether the dimension passed or failed. - * - * Generated from protobuf field bool passed = 3; - * @return bool - */ - public function getPassed() - { - return $this->passed; - } - - /** - * Whether the dimension passed or failed. - * - * Generated from protobuf field bool passed = 3; - * @param bool $var - * @return $this - */ - public function setPassed($var) - { - GPBUtil::checkBool($var); - $this->passed = $var; - - return $this; - } - - /** - * Output only. The dimension-level data quality score for this data scan job - * if and only if the 'dimension' field is set. - * The score ranges between [0, 100] (up to two decimal - * points). - * - * Generated from protobuf field optional float score = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return float - */ - public function getScore() - { - return isset($this->score) ? $this->score : 0.0; - } - - public function hasScore() - { - return isset($this->score); - } - - public function clearScore() - { - unset($this->score); - } - - /** - * Output only. The dimension-level data quality score for this data scan job - * if and only if the 'dimension' field is set. - * The score ranges between [0, 100] (up to two decimal - * points). - * - * Generated from protobuf field optional float score = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param float $var - * @return $this - */ - public function setScore($var) - { - GPBUtil::checkFloat($var); - $this->score = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityResult.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityResult.php deleted file mode 100644 index 8daeb1cb9bca..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityResult.php +++ /dev/null @@ -1,355 +0,0 @@ -google.cloud.dataplex.v1.DataQualityResult - */ -class DataQualityResult extends \Google\Protobuf\Internal\Message -{ - /** - * Overall data quality result -- `true` if all rules passed. - * - * Generated from protobuf field bool passed = 5; - */ - protected $passed = false; - /** - * Output only. The overall data quality score. - * The score ranges between [0, 100] (up to two decimal points). - * - * Generated from protobuf field optional float score = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $score = null; - /** - * A list of results at the dimension level. - * A dimension will have a corresponding `DataQualityDimensionResult` if and - * only if there is at least one rule with the 'dimension' field set to it. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataQualityDimensionResult dimensions = 2; - */ - private $dimensions; - /** - * Output only. A list of results at the column level. - * A column will have a corresponding `DataQualityColumnResult` if and only if - * there is at least one rule with the 'column' field set to it. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataQualityColumnResult columns = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $columns; - /** - * A list of all the rules in a job, and their results. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataQualityRuleResult rules = 3; - */ - private $rules; - /** - * The count of rows processed. - * - * Generated from protobuf field int64 row_count = 4; - */ - protected $row_count = 0; - /** - * The data scanned for this result. - * - * Generated from protobuf field .google.cloud.dataplex.v1.ScannedData scanned_data = 7; - */ - protected $scanned_data = null; - /** - * Output only. The result of post scan actions. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult post_scan_actions_result = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $post_scan_actions_result = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $passed - * Overall data quality result -- `true` if all rules passed. - * @type float $score - * Output only. The overall data quality score. - * The score ranges between [0, 100] (up to two decimal points). - * @type array<\Google\Cloud\Dataplex\V1\DataQualityDimensionResult>|\Google\Protobuf\Internal\RepeatedField $dimensions - * A list of results at the dimension level. - * A dimension will have a corresponding `DataQualityDimensionResult` if and - * only if there is at least one rule with the 'dimension' field set to it. - * @type array<\Google\Cloud\Dataplex\V1\DataQualityColumnResult>|\Google\Protobuf\Internal\RepeatedField $columns - * Output only. A list of results at the column level. - * A column will have a corresponding `DataQualityColumnResult` if and only if - * there is at least one rule with the 'column' field set to it. - * @type array<\Google\Cloud\Dataplex\V1\DataQualityRuleResult>|\Google\Protobuf\Internal\RepeatedField $rules - * A list of all the rules in a job, and their results. - * @type int|string $row_count - * The count of rows processed. - * @type \Google\Cloud\Dataplex\V1\ScannedData $scanned_data - * The data scanned for this result. - * @type \Google\Cloud\Dataplex\V1\DataQualityResult\PostScanActionsResult $post_scan_actions_result - * Output only. The result of post scan actions. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataQuality::initOnce(); - parent::__construct($data); - } - - /** - * Overall data quality result -- `true` if all rules passed. - * - * Generated from protobuf field bool passed = 5; - * @return bool - */ - public function getPassed() - { - return $this->passed; - } - - /** - * Overall data quality result -- `true` if all rules passed. - * - * Generated from protobuf field bool passed = 5; - * @param bool $var - * @return $this - */ - public function setPassed($var) - { - GPBUtil::checkBool($var); - $this->passed = $var; - - return $this; - } - - /** - * Output only. The overall data quality score. - * The score ranges between [0, 100] (up to two decimal points). - * - * Generated from protobuf field optional float score = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return float - */ - public function getScore() - { - return isset($this->score) ? $this->score : 0.0; - } - - public function hasScore() - { - return isset($this->score); - } - - public function clearScore() - { - unset($this->score); - } - - /** - * Output only. The overall data quality score. - * The score ranges between [0, 100] (up to two decimal points). - * - * Generated from protobuf field optional float score = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param float $var - * @return $this - */ - public function setScore($var) - { - GPBUtil::checkFloat($var); - $this->score = $var; - - return $this; - } - - /** - * A list of results at the dimension level. - * A dimension will have a corresponding `DataQualityDimensionResult` if and - * only if there is at least one rule with the 'dimension' field set to it. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataQualityDimensionResult dimensions = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDimensions() - { - return $this->dimensions; - } - - /** - * A list of results at the dimension level. - * A dimension will have a corresponding `DataQualityDimensionResult` if and - * only if there is at least one rule with the 'dimension' field set to it. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataQualityDimensionResult dimensions = 2; - * @param array<\Google\Cloud\Dataplex\V1\DataQualityDimensionResult>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDimensions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\DataQualityDimensionResult::class); - $this->dimensions = $arr; - - return $this; - } - - /** - * Output only. A list of results at the column level. - * A column will have a corresponding `DataQualityColumnResult` if and only if - * there is at least one rule with the 'column' field set to it. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataQualityColumnResult columns = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getColumns() - { - return $this->columns; - } - - /** - * Output only. A list of results at the column level. - * A column will have a corresponding `DataQualityColumnResult` if and only if - * there is at least one rule with the 'column' field set to it. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataQualityColumnResult columns = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\Dataplex\V1\DataQualityColumnResult>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setColumns($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\DataQualityColumnResult::class); - $this->columns = $arr; - - return $this; - } - - /** - * A list of all the rules in a job, and their results. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataQualityRuleResult rules = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRules() - { - return $this->rules; - } - - /** - * A list of all the rules in a job, and their results. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataQualityRuleResult rules = 3; - * @param array<\Google\Cloud\Dataplex\V1\DataQualityRuleResult>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRules($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\DataQualityRuleResult::class); - $this->rules = $arr; - - return $this; - } - - /** - * The count of rows processed. - * - * Generated from protobuf field int64 row_count = 4; - * @return int|string - */ - public function getRowCount() - { - return $this->row_count; - } - - /** - * The count of rows processed. - * - * Generated from protobuf field int64 row_count = 4; - * @param int|string $var - * @return $this - */ - public function setRowCount($var) - { - GPBUtil::checkInt64($var); - $this->row_count = $var; - - return $this; - } - - /** - * The data scanned for this result. - * - * Generated from protobuf field .google.cloud.dataplex.v1.ScannedData scanned_data = 7; - * @return \Google\Cloud\Dataplex\V1\ScannedData|null - */ - public function getScannedData() - { - return $this->scanned_data; - } - - public function hasScannedData() - { - return isset($this->scanned_data); - } - - public function clearScannedData() - { - unset($this->scanned_data); - } - - /** - * The data scanned for this result. - * - * Generated from protobuf field .google.cloud.dataplex.v1.ScannedData scanned_data = 7; - * @param \Google\Cloud\Dataplex\V1\ScannedData $var - * @return $this - */ - public function setScannedData($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\ScannedData::class); - $this->scanned_data = $var; - - return $this; - } - - /** - * Output only. The result of post scan actions. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult post_scan_actions_result = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Dataplex\V1\DataQualityResult\PostScanActionsResult|null - */ - public function getPostScanActionsResult() - { - return $this->post_scan_actions_result; - } - - public function hasPostScanActionsResult() - { - return isset($this->post_scan_actions_result); - } - - public function clearPostScanActionsResult() - { - unset($this->post_scan_actions_result); - } - - /** - * Output only. The result of post scan actions. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult post_scan_actions_result = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Dataplex\V1\DataQualityResult\PostScanActionsResult $var - * @return $this - */ - public function setPostScanActionsResult($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataQualityResult\PostScanActionsResult::class); - $this->post_scan_actions_result = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityResult/PostScanActionsResult.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityResult/PostScanActionsResult.php deleted file mode 100644 index 2b58624056bc..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityResult/PostScanActionsResult.php +++ /dev/null @@ -1,80 +0,0 @@ -google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult - */ -class PostScanActionsResult extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The result of BigQuery export post scan action. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult bigquery_export_result = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $bigquery_export_result = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dataplex\V1\DataQualityResult\PostScanActionsResult\BigQueryExportResult $bigquery_export_result - * Output only. The result of BigQuery export post scan action. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataQuality::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The result of BigQuery export post scan action. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult bigquery_export_result = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Dataplex\V1\DataQualityResult\PostScanActionsResult\BigQueryExportResult|null - */ - public function getBigqueryExportResult() - { - return $this->bigquery_export_result; - } - - public function hasBigqueryExportResult() - { - return isset($this->bigquery_export_result); - } - - public function clearBigqueryExportResult() - { - unset($this->bigquery_export_result); - } - - /** - * Output only. The result of BigQuery export post scan action. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult bigquery_export_result = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Dataplex\V1\DataQualityResult\PostScanActionsResult\BigQueryExportResult $var - * @return $this - */ - public function setBigqueryExportResult($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataQualityResult\PostScanActionsResult\BigQueryExportResult::class); - $this->bigquery_export_result = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(PostScanActionsResult::class, \Google\Cloud\Dataplex\V1\DataQualityResult_PostScanActionsResult::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityResult/PostScanActionsResult/BigQueryExportResult.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityResult/PostScanActionsResult/BigQueryExportResult.php deleted file mode 100644 index 8f4f124efb15..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityResult/PostScanActionsResult/BigQueryExportResult.php +++ /dev/null @@ -1,104 +0,0 @@ -google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult - */ -class BigQueryExportResult extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Execution state for the BigQuery exporting. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. Additional information about the BigQuery exporting. - * - * Generated from protobuf field string message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $message = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $state - * Output only. Execution state for the BigQuery exporting. - * @type string $message - * Output only. Additional information about the BigQuery exporting. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataQuality::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Execution state for the BigQuery exporting. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. Execution state for the BigQuery exporting. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\DataQualityResult\PostScanActionsResult\BigQueryExportResult\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. Additional information about the BigQuery exporting. - * - * Generated from protobuf field string message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getMessage() - { - return $this->message; - } - - /** - * Output only. Additional information about the BigQuery exporting. - * - * Generated from protobuf field string message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setMessage($var) - { - GPBUtil::checkString($var, True); - $this->message = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(BigQueryExportResult::class, \Google\Cloud\Dataplex\V1\DataQualityResult_PostScanActionsResult_BigQueryExportResult::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityResult/PostScanActionsResult/BigQueryExportResult/State.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityResult/PostScanActionsResult/BigQueryExportResult/State.php deleted file mode 100644 index 39f3c3bedfa3..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityResult/PostScanActionsResult/BigQueryExportResult/State.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult.State - */ -class State -{ - /** - * The exporting state is unspecified. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The exporting completed successfully. - * - * Generated from protobuf enum SUCCEEDED = 1; - */ - const SUCCEEDED = 1; - /** - * The exporting is no longer running due to an error. - * - * Generated from protobuf enum FAILED = 2; - */ - const FAILED = 2; - /** - * The exporting is skipped due to no valid scan result to export - * (usually caused by scan failed). - * - * Generated from protobuf enum SKIPPED = 3; - */ - const SKIPPED = 3; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::SUCCEEDED => 'SUCCEEDED', - self::FAILED => 'FAILED', - self::SKIPPED => 'SKIPPED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\Dataplex\V1\DataQualityResult_PostScanActionsResult_BigQueryExportResult_State::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule.php deleted file mode 100644 index e280573c33cc..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule.php +++ /dev/null @@ -1,636 +0,0 @@ -google.cloud.dataplex.v1.DataQualityRule - */ -class DataQualityRule extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The unnested column which this rule is evaluated against. - * - * Generated from protobuf field string column = 500 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $column = ''; - /** - * Optional. Rows with `null` values will automatically fail a rule, unless - * `ignore_null` is `true`. In that case, such `null` rows are trivially - * considered passing. - * This field is only valid for the following type of rules: - * * RangeExpectation - * * RegexExpectation - * * SetExpectation - * * UniquenessExpectation - * - * Generated from protobuf field bool ignore_null = 501 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $ignore_null = false; - /** - * Required. The dimension a rule belongs to. Results are also aggregated at - * the dimension level. Supported dimensions are **["COMPLETENESS", - * "ACCURACY", "CONSISTENCY", "VALIDITY", "UNIQUENESS", "INTEGRITY"]** - * - * Generated from protobuf field string dimension = 502 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $dimension = ''; - /** - * Optional. The minimum ratio of **passing_rows / total_rows** required to - * pass this rule, with a range of [0.0, 1.0]. - * 0 indicates default value (i.e. 1.0). - * This field is only valid for row-level type rules. - * - * Generated from protobuf field double threshold = 503 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $threshold = 0.0; - /** - * Optional. A mutable name for the rule. - * * The name must contain only letters (a-z, A-Z), numbers (0-9), or - * hyphens (-). - * * The maximum length is 63 characters. - * * Must start with a letter. - * * Must end with a number or a letter. - * - * Generated from protobuf field string name = 504 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $name = ''; - /** - * Optional. Description of the rule. - * * The maximum length is 1,024 characters. - * - * Generated from protobuf field string description = 505 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - protected $rule_type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dataplex\V1\DataQualityRule\RangeExpectation $range_expectation - * Row-level rule which evaluates whether each column value lies between a - * specified range. - * @type \Google\Cloud\Dataplex\V1\DataQualityRule\NonNullExpectation $non_null_expectation - * Row-level rule which evaluates whether each column value is null. - * @type \Google\Cloud\Dataplex\V1\DataQualityRule\SetExpectation $set_expectation - * Row-level rule which evaluates whether each column value is contained by - * a specified set. - * @type \Google\Cloud\Dataplex\V1\DataQualityRule\RegexExpectation $regex_expectation - * Row-level rule which evaluates whether each column value matches a - * specified regex. - * @type \Google\Cloud\Dataplex\V1\DataQualityRule\UniquenessExpectation $uniqueness_expectation - * Row-level rule which evaluates whether each column value is unique. - * @type \Google\Cloud\Dataplex\V1\DataQualityRule\StatisticRangeExpectation $statistic_range_expectation - * Aggregate rule which evaluates whether the column aggregate - * statistic lies between a specified range. - * @type \Google\Cloud\Dataplex\V1\DataQualityRule\RowConditionExpectation $row_condition_expectation - * Row-level rule which evaluates whether each row in a table passes the - * specified condition. - * @type \Google\Cloud\Dataplex\V1\DataQualityRule\TableConditionExpectation $table_condition_expectation - * Aggregate rule which evaluates whether the provided expression is true - * for a table. - * @type \Google\Cloud\Dataplex\V1\DataQualityRule\SqlAssertion $sql_assertion - * Aggregate rule which evaluates the number of rows returned for the - * provided statement. - * @type string $column - * Optional. The unnested column which this rule is evaluated against. - * @type bool $ignore_null - * Optional. Rows with `null` values will automatically fail a rule, unless - * `ignore_null` is `true`. In that case, such `null` rows are trivially - * considered passing. - * This field is only valid for the following type of rules: - * * RangeExpectation - * * RegexExpectation - * * SetExpectation - * * UniquenessExpectation - * @type string $dimension - * Required. The dimension a rule belongs to. Results are also aggregated at - * the dimension level. Supported dimensions are **["COMPLETENESS", - * "ACCURACY", "CONSISTENCY", "VALIDITY", "UNIQUENESS", "INTEGRITY"]** - * @type float $threshold - * Optional. The minimum ratio of **passing_rows / total_rows** required to - * pass this rule, with a range of [0.0, 1.0]. - * 0 indicates default value (i.e. 1.0). - * This field is only valid for row-level type rules. - * @type string $name - * Optional. A mutable name for the rule. - * * The name must contain only letters (a-z, A-Z), numbers (0-9), or - * hyphens (-). - * * The maximum length is 63 characters. - * * Must start with a letter. - * * Must end with a number or a letter. - * @type string $description - * Optional. Description of the rule. - * * The maximum length is 1,024 characters. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataQuality::initOnce(); - parent::__construct($data); - } - - /** - * Row-level rule which evaluates whether each column value lies between a - * specified range. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityRule.RangeExpectation range_expectation = 1; - * @return \Google\Cloud\Dataplex\V1\DataQualityRule\RangeExpectation|null - */ - public function getRangeExpectation() - { - return $this->readOneof(1); - } - - public function hasRangeExpectation() - { - return $this->hasOneof(1); - } - - /** - * Row-level rule which evaluates whether each column value lies between a - * specified range. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityRule.RangeExpectation range_expectation = 1; - * @param \Google\Cloud\Dataplex\V1\DataQualityRule\RangeExpectation $var - * @return $this - */ - public function setRangeExpectation($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataQualityRule\RangeExpectation::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Row-level rule which evaluates whether each column value is null. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation non_null_expectation = 2; - * @return \Google\Cloud\Dataplex\V1\DataQualityRule\NonNullExpectation|null - */ - public function getNonNullExpectation() - { - return $this->readOneof(2); - } - - public function hasNonNullExpectation() - { - return $this->hasOneof(2); - } - - /** - * Row-level rule which evaluates whether each column value is null. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation non_null_expectation = 2; - * @param \Google\Cloud\Dataplex\V1\DataQualityRule\NonNullExpectation $var - * @return $this - */ - public function setNonNullExpectation($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataQualityRule\NonNullExpectation::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Row-level rule which evaluates whether each column value is contained by - * a specified set. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityRule.SetExpectation set_expectation = 3; - * @return \Google\Cloud\Dataplex\V1\DataQualityRule\SetExpectation|null - */ - public function getSetExpectation() - { - return $this->readOneof(3); - } - - public function hasSetExpectation() - { - return $this->hasOneof(3); - } - - /** - * Row-level rule which evaluates whether each column value is contained by - * a specified set. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityRule.SetExpectation set_expectation = 3; - * @param \Google\Cloud\Dataplex\V1\DataQualityRule\SetExpectation $var - * @return $this - */ - public function setSetExpectation($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataQualityRule\SetExpectation::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Row-level rule which evaluates whether each column value matches a - * specified regex. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityRule.RegexExpectation regex_expectation = 4; - * @return \Google\Cloud\Dataplex\V1\DataQualityRule\RegexExpectation|null - */ - public function getRegexExpectation() - { - return $this->readOneof(4); - } - - public function hasRegexExpectation() - { - return $this->hasOneof(4); - } - - /** - * Row-level rule which evaluates whether each column value matches a - * specified regex. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityRule.RegexExpectation regex_expectation = 4; - * @param \Google\Cloud\Dataplex\V1\DataQualityRule\RegexExpectation $var - * @return $this - */ - public function setRegexExpectation($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataQualityRule\RegexExpectation::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Row-level rule which evaluates whether each column value is unique. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation uniqueness_expectation = 100; - * @return \Google\Cloud\Dataplex\V1\DataQualityRule\UniquenessExpectation|null - */ - public function getUniquenessExpectation() - { - return $this->readOneof(100); - } - - public function hasUniquenessExpectation() - { - return $this->hasOneof(100); - } - - /** - * Row-level rule which evaluates whether each column value is unique. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation uniqueness_expectation = 100; - * @param \Google\Cloud\Dataplex\V1\DataQualityRule\UniquenessExpectation $var - * @return $this - */ - public function setUniquenessExpectation($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataQualityRule\UniquenessExpectation::class); - $this->writeOneof(100, $var); - - return $this; - } - - /** - * Aggregate rule which evaluates whether the column aggregate - * statistic lies between a specified range. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation statistic_range_expectation = 101; - * @return \Google\Cloud\Dataplex\V1\DataQualityRule\StatisticRangeExpectation|null - */ - public function getStatisticRangeExpectation() - { - return $this->readOneof(101); - } - - public function hasStatisticRangeExpectation() - { - return $this->hasOneof(101); - } - - /** - * Aggregate rule which evaluates whether the column aggregate - * statistic lies between a specified range. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation statistic_range_expectation = 101; - * @param \Google\Cloud\Dataplex\V1\DataQualityRule\StatisticRangeExpectation $var - * @return $this - */ - public function setStatisticRangeExpectation($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataQualityRule\StatisticRangeExpectation::class); - $this->writeOneof(101, $var); - - return $this; - } - - /** - * Row-level rule which evaluates whether each row in a table passes the - * specified condition. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation row_condition_expectation = 200; - * @return \Google\Cloud\Dataplex\V1\DataQualityRule\RowConditionExpectation|null - */ - public function getRowConditionExpectation() - { - return $this->readOneof(200); - } - - public function hasRowConditionExpectation() - { - return $this->hasOneof(200); - } - - /** - * Row-level rule which evaluates whether each row in a table passes the - * specified condition. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation row_condition_expectation = 200; - * @param \Google\Cloud\Dataplex\V1\DataQualityRule\RowConditionExpectation $var - * @return $this - */ - public function setRowConditionExpectation($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataQualityRule\RowConditionExpectation::class); - $this->writeOneof(200, $var); - - return $this; - } - - /** - * Aggregate rule which evaluates whether the provided expression is true - * for a table. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation table_condition_expectation = 201; - * @return \Google\Cloud\Dataplex\V1\DataQualityRule\TableConditionExpectation|null - */ - public function getTableConditionExpectation() - { - return $this->readOneof(201); - } - - public function hasTableConditionExpectation() - { - return $this->hasOneof(201); - } - - /** - * Aggregate rule which evaluates whether the provided expression is true - * for a table. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation table_condition_expectation = 201; - * @param \Google\Cloud\Dataplex\V1\DataQualityRule\TableConditionExpectation $var - * @return $this - */ - public function setTableConditionExpectation($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataQualityRule\TableConditionExpectation::class); - $this->writeOneof(201, $var); - - return $this; - } - - /** - * Aggregate rule which evaluates the number of rows returned for the - * provided statement. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityRule.SqlAssertion sql_assertion = 202; - * @return \Google\Cloud\Dataplex\V1\DataQualityRule\SqlAssertion|null - */ - public function getSqlAssertion() - { - return $this->readOneof(202); - } - - public function hasSqlAssertion() - { - return $this->hasOneof(202); - } - - /** - * Aggregate rule which evaluates the number of rows returned for the - * provided statement. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityRule.SqlAssertion sql_assertion = 202; - * @param \Google\Cloud\Dataplex\V1\DataQualityRule\SqlAssertion $var - * @return $this - */ - public function setSqlAssertion($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataQualityRule\SqlAssertion::class); - $this->writeOneof(202, $var); - - return $this; - } - - /** - * Optional. The unnested column which this rule is evaluated against. - * - * Generated from protobuf field string column = 500 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getColumn() - { - return $this->column; - } - - /** - * Optional. The unnested column which this rule is evaluated against. - * - * Generated from protobuf field string column = 500 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setColumn($var) - { - GPBUtil::checkString($var, True); - $this->column = $var; - - return $this; - } - - /** - * Optional. Rows with `null` values will automatically fail a rule, unless - * `ignore_null` is `true`. In that case, such `null` rows are trivially - * considered passing. - * This field is only valid for the following type of rules: - * * RangeExpectation - * * RegexExpectation - * * SetExpectation - * * UniquenessExpectation - * - * Generated from protobuf field bool ignore_null = 501 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getIgnoreNull() - { - return $this->ignore_null; - } - - /** - * Optional. Rows with `null` values will automatically fail a rule, unless - * `ignore_null` is `true`. In that case, such `null` rows are trivially - * considered passing. - * This field is only valid for the following type of rules: - * * RangeExpectation - * * RegexExpectation - * * SetExpectation - * * UniquenessExpectation - * - * Generated from protobuf field bool ignore_null = 501 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setIgnoreNull($var) - { - GPBUtil::checkBool($var); - $this->ignore_null = $var; - - return $this; - } - - /** - * Required. The dimension a rule belongs to. Results are also aggregated at - * the dimension level. Supported dimensions are **["COMPLETENESS", - * "ACCURACY", "CONSISTENCY", "VALIDITY", "UNIQUENESS", "INTEGRITY"]** - * - * Generated from protobuf field string dimension = 502 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDimension() - { - return $this->dimension; - } - - /** - * Required. The dimension a rule belongs to. Results are also aggregated at - * the dimension level. Supported dimensions are **["COMPLETENESS", - * "ACCURACY", "CONSISTENCY", "VALIDITY", "UNIQUENESS", "INTEGRITY"]** - * - * Generated from protobuf field string dimension = 502 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDimension($var) - { - GPBUtil::checkString($var, True); - $this->dimension = $var; - - return $this; - } - - /** - * Optional. The minimum ratio of **passing_rows / total_rows** required to - * pass this rule, with a range of [0.0, 1.0]. - * 0 indicates default value (i.e. 1.0). - * This field is only valid for row-level type rules. - * - * Generated from protobuf field double threshold = 503 [(.google.api.field_behavior) = OPTIONAL]; - * @return float - */ - public function getThreshold() - { - return $this->threshold; - } - - /** - * Optional. The minimum ratio of **passing_rows / total_rows** required to - * pass this rule, with a range of [0.0, 1.0]. - * 0 indicates default value (i.e. 1.0). - * This field is only valid for row-level type rules. - * - * Generated from protobuf field double threshold = 503 [(.google.api.field_behavior) = OPTIONAL]; - * @param float $var - * @return $this - */ - public function setThreshold($var) - { - GPBUtil::checkDouble($var); - $this->threshold = $var; - - return $this; - } - - /** - * Optional. A mutable name for the rule. - * * The name must contain only letters (a-z, A-Z), numbers (0-9), or - * hyphens (-). - * * The maximum length is 63 characters. - * * Must start with a letter. - * * Must end with a number or a letter. - * - * Generated from protobuf field string name = 504 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Optional. A mutable name for the rule. - * * The name must contain only letters (a-z, A-Z), numbers (0-9), or - * hyphens (-). - * * The maximum length is 63 characters. - * * Must start with a letter. - * * Must end with a number or a letter. - * - * Generated from protobuf field string name = 504 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. Description of the rule. - * * The maximum length is 1,024 characters. - * - * Generated from protobuf field string description = 505 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. Description of the rule. - * * The maximum length is 1,024 characters. - * - * Generated from protobuf field string description = 505 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * @return string - */ - public function getRuleType() - { - return $this->whichOneof("rule_type"); - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/NonNullExpectation.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/NonNullExpectation.php deleted file mode 100644 index a3895598790a..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/NonNullExpectation.php +++ /dev/null @@ -1,36 +0,0 @@ -google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation - */ -class NonNullExpectation extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataQuality::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(NonNullExpectation::class, \Google\Cloud\Dataplex\V1\DataQualityRule_NonNullExpectation::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/RangeExpectation.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/RangeExpectation.php deleted file mode 100644 index f61b5edb63f3..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/RangeExpectation.php +++ /dev/null @@ -1,204 +0,0 @@ -google.cloud.dataplex.v1.DataQualityRule.RangeExpectation - */ -class RangeExpectation extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The minimum column value allowed for a row to pass this - * validation. At least one of `min_value` and `max_value` need to be - * provided. - * - * Generated from protobuf field string min_value = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $min_value = ''; - /** - * Optional. The maximum column value allowed for a row to pass this - * validation. At least one of `min_value` and `max_value` need to be - * provided. - * - * Generated from protobuf field string max_value = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $max_value = ''; - /** - * Optional. Whether each value needs to be strictly greater than ('>') the - * minimum, or if equality is allowed. - * Only relevant if a `min_value` has been defined. Default = false. - * - * Generated from protobuf field bool strict_min_enabled = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $strict_min_enabled = false; - /** - * Optional. Whether each value needs to be strictly lesser than ('<') the - * maximum, or if equality is allowed. - * Only relevant if a `max_value` has been defined. Default = false. - * - * Generated from protobuf field bool strict_max_enabled = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $strict_max_enabled = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $min_value - * Optional. The minimum column value allowed for a row to pass this - * validation. At least one of `min_value` and `max_value` need to be - * provided. - * @type string $max_value - * Optional. The maximum column value allowed for a row to pass this - * validation. At least one of `min_value` and `max_value` need to be - * provided. - * @type bool $strict_min_enabled - * Optional. Whether each value needs to be strictly greater than ('>') the - * minimum, or if equality is allowed. - * Only relevant if a `min_value` has been defined. Default = false. - * @type bool $strict_max_enabled - * Optional. Whether each value needs to be strictly lesser than ('<') the - * maximum, or if equality is allowed. - * Only relevant if a `max_value` has been defined. Default = false. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataQuality::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The minimum column value allowed for a row to pass this - * validation. At least one of `min_value` and `max_value` need to be - * provided. - * - * Generated from protobuf field string min_value = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getMinValue() - { - return $this->min_value; - } - - /** - * Optional. The minimum column value allowed for a row to pass this - * validation. At least one of `min_value` and `max_value` need to be - * provided. - * - * Generated from protobuf field string min_value = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setMinValue($var) - { - GPBUtil::checkString($var, True); - $this->min_value = $var; - - return $this; - } - - /** - * Optional. The maximum column value allowed for a row to pass this - * validation. At least one of `min_value` and `max_value` need to be - * provided. - * - * Generated from protobuf field string max_value = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getMaxValue() - { - return $this->max_value; - } - - /** - * Optional. The maximum column value allowed for a row to pass this - * validation. At least one of `min_value` and `max_value` need to be - * provided. - * - * Generated from protobuf field string max_value = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setMaxValue($var) - { - GPBUtil::checkString($var, True); - $this->max_value = $var; - - return $this; - } - - /** - * Optional. Whether each value needs to be strictly greater than ('>') the - * minimum, or if equality is allowed. - * Only relevant if a `min_value` has been defined. Default = false. - * - * Generated from protobuf field bool strict_min_enabled = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getStrictMinEnabled() - { - return $this->strict_min_enabled; - } - - /** - * Optional. Whether each value needs to be strictly greater than ('>') the - * minimum, or if equality is allowed. - * Only relevant if a `min_value` has been defined. Default = false. - * - * Generated from protobuf field bool strict_min_enabled = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setStrictMinEnabled($var) - { - GPBUtil::checkBool($var); - $this->strict_min_enabled = $var; - - return $this; - } - - /** - * Optional. Whether each value needs to be strictly lesser than ('<') the - * maximum, or if equality is allowed. - * Only relevant if a `max_value` has been defined. Default = false. - * - * Generated from protobuf field bool strict_max_enabled = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getStrictMaxEnabled() - { - return $this->strict_max_enabled; - } - - /** - * Optional. Whether each value needs to be strictly lesser than ('<') the - * maximum, or if equality is allowed. - * Only relevant if a `max_value` has been defined. Default = false. - * - * Generated from protobuf field bool strict_max_enabled = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setStrictMaxEnabled($var) - { - GPBUtil::checkBool($var); - $this->strict_max_enabled = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(RangeExpectation::class, \Google\Cloud\Dataplex\V1\DataQualityRule_RangeExpectation::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/RegexExpectation.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/RegexExpectation.php deleted file mode 100644 index 0c063eb2e522..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/RegexExpectation.php +++ /dev/null @@ -1,70 +0,0 @@ -google.cloud.dataplex.v1.DataQualityRule.RegexExpectation - */ -class RegexExpectation extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. A regular expression the column value is expected to match. - * - * Generated from protobuf field string regex = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $regex = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $regex - * Optional. A regular expression the column value is expected to match. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataQuality::initOnce(); - parent::__construct($data); - } - - /** - * Optional. A regular expression the column value is expected to match. - * - * Generated from protobuf field string regex = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRegex() - { - return $this->regex; - } - - /** - * Optional. A regular expression the column value is expected to match. - * - * Generated from protobuf field string regex = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRegex($var) - { - GPBUtil::checkString($var, True); - $this->regex = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(RegexExpectation::class, \Google\Cloud\Dataplex\V1\DataQualityRule_RegexExpectation::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/RowConditionExpectation.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/RowConditionExpectation.php deleted file mode 100644 index 375eb693638f..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/RowConditionExpectation.php +++ /dev/null @@ -1,73 +0,0 @@ -= 0 AND col2 < 10 - * - * Generated from protobuf message google.cloud.dataplex.v1.DataQualityRule.RowConditionExpectation - */ -class RowConditionExpectation extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The SQL expression. - * - * Generated from protobuf field string sql_expression = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $sql_expression = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $sql_expression - * Optional. The SQL expression. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataQuality::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The SQL expression. - * - * Generated from protobuf field string sql_expression = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getSqlExpression() - { - return $this->sql_expression; - } - - /** - * Optional. The SQL expression. - * - * Generated from protobuf field string sql_expression = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setSqlExpression($var) - { - GPBUtil::checkString($var, True); - $this->sql_expression = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(RowConditionExpectation::class, \Google\Cloud\Dataplex\V1\DataQualityRule_RowConditionExpectation::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/SetExpectation.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/SetExpectation.php deleted file mode 100644 index 2d2df81627f5..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/SetExpectation.php +++ /dev/null @@ -1,70 +0,0 @@ -google.cloud.dataplex.v1.DataQualityRule.SetExpectation - */ -class SetExpectation extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Expected values for the column value. - * - * Generated from protobuf field repeated string values = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $values; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $values - * Optional. Expected values for the column value. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataQuality::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Expected values for the column value. - * - * Generated from protobuf field repeated string values = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getValues() - { - return $this->values; - } - - /** - * Optional. Expected values for the column value. - * - * Generated from protobuf field repeated string values = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setValues($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->values = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SetExpectation::class, \Google\Cloud\Dataplex\V1\DataQualityRule_SetExpectation::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/StatisticRangeExpectation.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/StatisticRangeExpectation.php deleted file mode 100644 index 0712f1d292f8..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/StatisticRangeExpectation.php +++ /dev/null @@ -1,239 +0,0 @@ -google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation - */ -class StatisticRangeExpectation extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The aggregate metric to evaluate. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.ColumnStatistic statistic = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $statistic = 0; - /** - * Optional. The minimum column statistic value allowed for a row to pass - * this validation. - * At least one of `min_value` and `max_value` need to be provided. - * - * Generated from protobuf field string min_value = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $min_value = ''; - /** - * Optional. The maximum column statistic value allowed for a row to pass - * this validation. - * At least one of `min_value` and `max_value` need to be provided. - * - * Generated from protobuf field string max_value = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $max_value = ''; - /** - * Optional. Whether column statistic needs to be strictly greater than - * ('>') the minimum, or if equality is allowed. - * Only relevant if a `min_value` has been defined. Default = false. - * - * Generated from protobuf field bool strict_min_enabled = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $strict_min_enabled = false; - /** - * Optional. Whether column statistic needs to be strictly lesser than ('<') - * the maximum, or if equality is allowed. - * Only relevant if a `max_value` has been defined. Default = false. - * - * Generated from protobuf field bool strict_max_enabled = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $strict_max_enabled = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $statistic - * Optional. The aggregate metric to evaluate. - * @type string $min_value - * Optional. The minimum column statistic value allowed for a row to pass - * this validation. - * At least one of `min_value` and `max_value` need to be provided. - * @type string $max_value - * Optional. The maximum column statistic value allowed for a row to pass - * this validation. - * At least one of `min_value` and `max_value` need to be provided. - * @type bool $strict_min_enabled - * Optional. Whether column statistic needs to be strictly greater than - * ('>') the minimum, or if equality is allowed. - * Only relevant if a `min_value` has been defined. Default = false. - * @type bool $strict_max_enabled - * Optional. Whether column statistic needs to be strictly lesser than ('<') - * the maximum, or if equality is allowed. - * Only relevant if a `max_value` has been defined. Default = false. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataQuality::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The aggregate metric to evaluate. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.ColumnStatistic statistic = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getStatistic() - { - return $this->statistic; - } - - /** - * Optional. The aggregate metric to evaluate. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.ColumnStatistic statistic = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setStatistic($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\DataQualityRule\StatisticRangeExpectation\ColumnStatistic::class); - $this->statistic = $var; - - return $this; - } - - /** - * Optional. The minimum column statistic value allowed for a row to pass - * this validation. - * At least one of `min_value` and `max_value` need to be provided. - * - * Generated from protobuf field string min_value = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getMinValue() - { - return $this->min_value; - } - - /** - * Optional. The minimum column statistic value allowed for a row to pass - * this validation. - * At least one of `min_value` and `max_value` need to be provided. - * - * Generated from protobuf field string min_value = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setMinValue($var) - { - GPBUtil::checkString($var, True); - $this->min_value = $var; - - return $this; - } - - /** - * Optional. The maximum column statistic value allowed for a row to pass - * this validation. - * At least one of `min_value` and `max_value` need to be provided. - * - * Generated from protobuf field string max_value = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getMaxValue() - { - return $this->max_value; - } - - /** - * Optional. The maximum column statistic value allowed for a row to pass - * this validation. - * At least one of `min_value` and `max_value` need to be provided. - * - * Generated from protobuf field string max_value = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setMaxValue($var) - { - GPBUtil::checkString($var, True); - $this->max_value = $var; - - return $this; - } - - /** - * Optional. Whether column statistic needs to be strictly greater than - * ('>') the minimum, or if equality is allowed. - * Only relevant if a `min_value` has been defined. Default = false. - * - * Generated from protobuf field bool strict_min_enabled = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getStrictMinEnabled() - { - return $this->strict_min_enabled; - } - - /** - * Optional. Whether column statistic needs to be strictly greater than - * ('>') the minimum, or if equality is allowed. - * Only relevant if a `min_value` has been defined. Default = false. - * - * Generated from protobuf field bool strict_min_enabled = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setStrictMinEnabled($var) - { - GPBUtil::checkBool($var); - $this->strict_min_enabled = $var; - - return $this; - } - - /** - * Optional. Whether column statistic needs to be strictly lesser than ('<') - * the maximum, or if equality is allowed. - * Only relevant if a `max_value` has been defined. Default = false. - * - * Generated from protobuf field bool strict_max_enabled = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getStrictMaxEnabled() - { - return $this->strict_max_enabled; - } - - /** - * Optional. Whether column statistic needs to be strictly lesser than ('<') - * the maximum, or if equality is allowed. - * Only relevant if a `max_value` has been defined. Default = false. - * - * Generated from protobuf field bool strict_max_enabled = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setStrictMaxEnabled($var) - { - GPBUtil::checkBool($var); - $this->strict_max_enabled = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(StatisticRangeExpectation::class, \Google\Cloud\Dataplex\V1\DataQualityRule_StatisticRangeExpectation::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/StatisticRangeExpectation/ColumnStatistic.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/StatisticRangeExpectation/ColumnStatistic.php deleted file mode 100644 index 6ae805f5de91..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/StatisticRangeExpectation/ColumnStatistic.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.ColumnStatistic - */ -class ColumnStatistic -{ - /** - * Unspecified statistic type - * - * Generated from protobuf enum STATISTIC_UNDEFINED = 0; - */ - const STATISTIC_UNDEFINED = 0; - /** - * Evaluate the column mean - * - * Generated from protobuf enum MEAN = 1; - */ - const MEAN = 1; - /** - * Evaluate the column min - * - * Generated from protobuf enum MIN = 2; - */ - const MIN = 2; - /** - * Evaluate the column max - * - * Generated from protobuf enum MAX = 3; - */ - const MAX = 3; - - private static $valueToName = [ - self::STATISTIC_UNDEFINED => 'STATISTIC_UNDEFINED', - self::MEAN => 'MEAN', - self::MIN => 'MIN', - self::MAX => 'MAX', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ColumnStatistic::class, \Google\Cloud\Dataplex\V1\DataQualityRule_StatisticRangeExpectation_ColumnStatistic::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/TableConditionExpectation.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/TableConditionExpectation.php deleted file mode 100644 index e0c173a4c08b..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/TableConditionExpectation.php +++ /dev/null @@ -1,73 +0,0 @@ -= 0 - * - * Generated from protobuf message google.cloud.dataplex.v1.DataQualityRule.TableConditionExpectation - */ -class TableConditionExpectation extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The SQL expression. - * - * Generated from protobuf field string sql_expression = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $sql_expression = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $sql_expression - * Optional. The SQL expression. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataQuality::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The SQL expression. - * - * Generated from protobuf field string sql_expression = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getSqlExpression() - { - return $this->sql_expression; - } - - /** - * Optional. The SQL expression. - * - * Generated from protobuf field string sql_expression = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setSqlExpression($var) - { - GPBUtil::checkString($var, True); - $this->sql_expression = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(TableConditionExpectation::class, \Google\Cloud\Dataplex\V1\DataQualityRule_TableConditionExpectation::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/UniquenessExpectation.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/UniquenessExpectation.php deleted file mode 100644 index b8303790ed89..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRule/UniquenessExpectation.php +++ /dev/null @@ -1,36 +0,0 @@ -google.cloud.dataplex.v1.DataQualityRule.UniquenessExpectation - */ -class UniquenessExpectation extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataQuality::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(UniquenessExpectation::class, \Google\Cloud\Dataplex\V1\DataQualityRule_UniquenessExpectation::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRuleResult.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRuleResult.php deleted file mode 100644 index 99064fea716c..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityRuleResult.php +++ /dev/null @@ -1,359 +0,0 @@ -google.cloud.dataplex.v1.DataQualityRuleResult - */ -class DataQualityRuleResult extends \Google\Protobuf\Internal\Message -{ - /** - * The rule specified in the DataQualitySpec, as is. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityRule rule = 1; - */ - protected $rule = null; - /** - * Whether the rule passed or failed. - * - * Generated from protobuf field bool passed = 7; - */ - protected $passed = false; - /** - * 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 either - * * include all rows (default) - with `null` rows automatically failing rule - * evaluation, or - * * exclude `null` rows from the `evaluated_count`, by setting - * `ignore_nulls = true`. - * - * Generated from protobuf field int64 evaluated_count = 9; - */ - protected $evaluated_count = 0; - /** - * The number of rows which passed a rule evaluation. - * This field is only valid for row-level type rules. - * - * Generated from protobuf field int64 passed_count = 8; - */ - protected $passed_count = 0; - /** - * The number of rows with null values in the specified column. - * - * Generated from protobuf field int64 null_count = 5; - */ - protected $null_count = 0; - /** - * The ratio of **passed_count / evaluated_count**. - * This field is only valid for row-level type rules. - * - * Generated from protobuf field double pass_ratio = 6; - */ - protected $pass_ratio = 0.0; - /** - * The query to find rows that did not pass this rule. - * This field is only valid for row-level type rules. - * - * Generated from protobuf field string failing_rows_query = 10; - */ - protected $failing_rows_query = ''; - /** - * Output only. The number of rows returned by the sql statement in the - * SqlAssertion rule. - * This field is only valid for SqlAssertion rules. - * - * Generated from protobuf field int64 assertion_row_count = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $assertion_row_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dataplex\V1\DataQualityRule $rule - * The rule specified in the DataQualitySpec, as is. - * @type bool $passed - * Whether the rule passed or failed. - * @type int|string $evaluated_count - * 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 either - * * include all rows (default) - with `null` rows automatically failing rule - * evaluation, or - * * exclude `null` rows from the `evaluated_count`, by setting - * `ignore_nulls = true`. - * @type int|string $passed_count - * The number of rows which passed a rule evaluation. - * This field is only valid for row-level type rules. - * @type int|string $null_count - * The number of rows with null values in the specified column. - * @type float $pass_ratio - * The ratio of **passed_count / evaluated_count**. - * This field is only valid for row-level type rules. - * @type string $failing_rows_query - * The query to find rows that did not pass this rule. - * This field is only valid for row-level type rules. - * @type int|string $assertion_row_count - * Output only. The number of rows returned by the sql statement in the - * SqlAssertion rule. - * This field is only valid for SqlAssertion rules. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataQuality::initOnce(); - parent::__construct($data); - } - - /** - * The rule specified in the DataQualitySpec, as is. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityRule rule = 1; - * @return \Google\Cloud\Dataplex\V1\DataQualityRule|null - */ - public function getRule() - { - return $this->rule; - } - - public function hasRule() - { - return isset($this->rule); - } - - public function clearRule() - { - unset($this->rule); - } - - /** - * The rule specified in the DataQualitySpec, as is. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityRule rule = 1; - * @param \Google\Cloud\Dataplex\V1\DataQualityRule $var - * @return $this - */ - public function setRule($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataQualityRule::class); - $this->rule = $var; - - return $this; - } - - /** - * Whether the rule passed or failed. - * - * Generated from protobuf field bool passed = 7; - * @return bool - */ - public function getPassed() - { - return $this->passed; - } - - /** - * Whether the rule passed or failed. - * - * Generated from protobuf field bool passed = 7; - * @param bool $var - * @return $this - */ - public function setPassed($var) - { - GPBUtil::checkBool($var); - $this->passed = $var; - - return $this; - } - - /** - * 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 either - * * include all rows (default) - with `null` rows automatically failing rule - * evaluation, or - * * exclude `null` rows from the `evaluated_count`, by setting - * `ignore_nulls = true`. - * - * Generated from protobuf field int64 evaluated_count = 9; - * @return int|string - */ - public function getEvaluatedCount() - { - return $this->evaluated_count; - } - - /** - * 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 either - * * include all rows (default) - with `null` rows automatically failing rule - * evaluation, or - * * exclude `null` rows from the `evaluated_count`, by setting - * `ignore_nulls = true`. - * - * Generated from protobuf field int64 evaluated_count = 9; - * @param int|string $var - * @return $this - */ - public function setEvaluatedCount($var) - { - GPBUtil::checkInt64($var); - $this->evaluated_count = $var; - - return $this; - } - - /** - * The number of rows which passed a rule evaluation. - * This field is only valid for row-level type rules. - * - * Generated from protobuf field int64 passed_count = 8; - * @return int|string - */ - public function getPassedCount() - { - return $this->passed_count; - } - - /** - * The number of rows which passed a rule evaluation. - * This field is only valid for row-level type rules. - * - * Generated from protobuf field int64 passed_count = 8; - * @param int|string $var - * @return $this - */ - public function setPassedCount($var) - { - GPBUtil::checkInt64($var); - $this->passed_count = $var; - - return $this; - } - - /** - * The number of rows with null values in the specified column. - * - * Generated from protobuf field int64 null_count = 5; - * @return int|string - */ - public function getNullCount() - { - return $this->null_count; - } - - /** - * The number of rows with null values in the specified column. - * - * Generated from protobuf field int64 null_count = 5; - * @param int|string $var - * @return $this - */ - public function setNullCount($var) - { - GPBUtil::checkInt64($var); - $this->null_count = $var; - - return $this; - } - - /** - * The ratio of **passed_count / evaluated_count**. - * This field is only valid for row-level type rules. - * - * Generated from protobuf field double pass_ratio = 6; - * @return float - */ - public function getPassRatio() - { - return $this->pass_ratio; - } - - /** - * The ratio of **passed_count / evaluated_count**. - * This field is only valid for row-level type rules. - * - * Generated from protobuf field double pass_ratio = 6; - * @param float $var - * @return $this - */ - public function setPassRatio($var) - { - GPBUtil::checkDouble($var); - $this->pass_ratio = $var; - - return $this; - } - - /** - * The query to find rows that did not pass this rule. - * This field is only valid for row-level type rules. - * - * Generated from protobuf field string failing_rows_query = 10; - * @return string - */ - public function getFailingRowsQuery() - { - return $this->failing_rows_query; - } - - /** - * The query to find rows that did not pass this rule. - * This field is only valid for row-level type rules. - * - * Generated from protobuf field string failing_rows_query = 10; - * @param string $var - * @return $this - */ - public function setFailingRowsQuery($var) - { - GPBUtil::checkString($var, True); - $this->failing_rows_query = $var; - - return $this; - } - - /** - * Output only. The number of rows returned by the sql statement in the - * SqlAssertion rule. - * This field is only valid for SqlAssertion rules. - * - * Generated from protobuf field int64 assertion_row_count = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getAssertionRowCount() - { - return $this->assertion_row_count; - } - - /** - * Output only. The number of rows returned by the sql statement in the - * SqlAssertion rule. - * This field is only valid for SqlAssertion rules. - * - * Generated from protobuf field int64 assertion_row_count = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setAssertionRowCount($var) - { - GPBUtil::checkInt64($var); - $this->assertion_row_count = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityScanRuleResult.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityScanRuleResult.php deleted file mode 100644 index 92c79c3b1cd7..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityScanRuleResult.php +++ /dev/null @@ -1,488 +0,0 @@ -google.cloud.dataplex.v1.DataQualityScanRuleResult - */ -class DataQualityScanRuleResult extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier of the specific data scan job this log entry is for. - * - * Generated from protobuf field string job_id = 1; - */ - protected $job_id = ''; - /** - * The data source of the data scan (e.g. BigQuery table name). - * - * Generated from protobuf field string data_source = 2; - */ - protected $data_source = ''; - /** - * The column which this rule is evaluated against. - * - * Generated from protobuf field string column = 3; - */ - protected $column = ''; - /** - * The name of the data quality rule. - * - * Generated from protobuf field string rule_name = 4; - */ - protected $rule_name = ''; - /** - * The type of the data quality rule. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityScanRuleResult.RuleType rule_type = 5; - */ - protected $rule_type = 0; - /** - * The evaluation type of the data quality rule. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityScanRuleResult.EvaluationType evalution_type = 6; - */ - protected $evalution_type = 0; - /** - * The dimension of the data quality rule. - * - * Generated from protobuf field string rule_dimension = 7; - */ - protected $rule_dimension = ''; - /** - * The passing threshold ([0.0, 100.0]) of the data quality rule. - * - * Generated from protobuf field double threshold_percent = 8; - */ - protected $threshold_percent = 0.0; - /** - * The result of the data quality rule. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityScanRuleResult.Result result = 9; - */ - protected $result = 0; - /** - * The number of rows evaluated against the data quality rule. - * This field is only valid for rules of PER_ROW evaluation type. - * - * Generated from protobuf field int64 evaluated_row_count = 10; - */ - protected $evaluated_row_count = 0; - /** - * The number of rows which passed a rule evaluation. - * This field is only valid for rules of PER_ROW evaluation type. - * - * Generated from protobuf field int64 passed_row_count = 11; - */ - protected $passed_row_count = 0; - /** - * The number of rows with null values in the specified column. - * - * Generated from protobuf field int64 null_row_count = 12; - */ - protected $null_row_count = 0; - /** - * The number of rows returned by the sql statement in the SqlAssertion rule. - * This field is only valid for SqlAssertion rules. - * - * Generated from protobuf field int64 assertion_row_count = 13; - */ - protected $assertion_row_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $job_id - * Identifier of the specific data scan job this log entry is for. - * @type string $data_source - * The data source of the data scan (e.g. BigQuery table name). - * @type string $column - * The column which this rule is evaluated against. - * @type string $rule_name - * The name of the data quality rule. - * @type int $rule_type - * The type of the data quality rule. - * @type int $evalution_type - * The evaluation type of the data quality rule. - * @type string $rule_dimension - * The dimension of the data quality rule. - * @type float $threshold_percent - * The passing threshold ([0.0, 100.0]) of the data quality rule. - * @type int $result - * The result of the data quality rule. - * @type int|string $evaluated_row_count - * The number of rows evaluated against the data quality rule. - * This field is only valid for rules of PER_ROW evaluation type. - * @type int|string $passed_row_count - * The number of rows which passed a rule evaluation. - * This field is only valid for rules of PER_ROW evaluation type. - * @type int|string $null_row_count - * The number of rows with null values in the specified column. - * @type int|string $assertion_row_count - * The number of rows returned by the sql statement in the SqlAssertion rule. - * This field is only valid for SqlAssertion rules. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Logs::initOnce(); - parent::__construct($data); - } - - /** - * Identifier of the specific data scan job this log entry is for. - * - * Generated from protobuf field string job_id = 1; - * @return string - */ - public function getJobId() - { - return $this->job_id; - } - - /** - * Identifier of the specific data scan job this log entry is for. - * - * Generated from protobuf field string job_id = 1; - * @param string $var - * @return $this - */ - public function setJobId($var) - { - GPBUtil::checkString($var, True); - $this->job_id = $var; - - return $this; - } - - /** - * The data source of the data scan (e.g. BigQuery table name). - * - * Generated from protobuf field string data_source = 2; - * @return string - */ - public function getDataSource() - { - return $this->data_source; - } - - /** - * The data source of the data scan (e.g. BigQuery table name). - * - * Generated from protobuf field string data_source = 2; - * @param string $var - * @return $this - */ - public function setDataSource($var) - { - GPBUtil::checkString($var, True); - $this->data_source = $var; - - return $this; - } - - /** - * The column which this rule is evaluated against. - * - * Generated from protobuf field string column = 3; - * @return string - */ - public function getColumn() - { - return $this->column; - } - - /** - * The column which this rule is evaluated against. - * - * Generated from protobuf field string column = 3; - * @param string $var - * @return $this - */ - public function setColumn($var) - { - GPBUtil::checkString($var, True); - $this->column = $var; - - return $this; - } - - /** - * The name of the data quality rule. - * - * Generated from protobuf field string rule_name = 4; - * @return string - */ - public function getRuleName() - { - return $this->rule_name; - } - - /** - * The name of the data quality rule. - * - * Generated from protobuf field string rule_name = 4; - * @param string $var - * @return $this - */ - public function setRuleName($var) - { - GPBUtil::checkString($var, True); - $this->rule_name = $var; - - return $this; - } - - /** - * The type of the data quality rule. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityScanRuleResult.RuleType rule_type = 5; - * @return int - */ - public function getRuleType() - { - return $this->rule_type; - } - - /** - * The type of the data quality rule. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityScanRuleResult.RuleType rule_type = 5; - * @param int $var - * @return $this - */ - public function setRuleType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\DataQualityScanRuleResult\RuleType::class); - $this->rule_type = $var; - - return $this; - } - - /** - * The evaluation type of the data quality rule. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityScanRuleResult.EvaluationType evalution_type = 6; - * @return int - */ - public function getEvalutionType() - { - return $this->evalution_type; - } - - /** - * The evaluation type of the data quality rule. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityScanRuleResult.EvaluationType evalution_type = 6; - * @param int $var - * @return $this - */ - public function setEvalutionType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\DataQualityScanRuleResult\EvaluationType::class); - $this->evalution_type = $var; - - return $this; - } - - /** - * The dimension of the data quality rule. - * - * Generated from protobuf field string rule_dimension = 7; - * @return string - */ - public function getRuleDimension() - { - return $this->rule_dimension; - } - - /** - * The dimension of the data quality rule. - * - * Generated from protobuf field string rule_dimension = 7; - * @param string $var - * @return $this - */ - public function setRuleDimension($var) - { - GPBUtil::checkString($var, True); - $this->rule_dimension = $var; - - return $this; - } - - /** - * The passing threshold ([0.0, 100.0]) of the data quality rule. - * - * Generated from protobuf field double threshold_percent = 8; - * @return float - */ - public function getThresholdPercent() - { - return $this->threshold_percent; - } - - /** - * The passing threshold ([0.0, 100.0]) of the data quality rule. - * - * Generated from protobuf field double threshold_percent = 8; - * @param float $var - * @return $this - */ - public function setThresholdPercent($var) - { - GPBUtil::checkDouble($var); - $this->threshold_percent = $var; - - return $this; - } - - /** - * The result of the data quality rule. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityScanRuleResult.Result result = 9; - * @return int - */ - public function getResult() - { - return $this->result; - } - - /** - * The result of the data quality rule. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityScanRuleResult.Result result = 9; - * @param int $var - * @return $this - */ - public function setResult($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\DataQualityScanRuleResult\Result::class); - $this->result = $var; - - return $this; - } - - /** - * The number of rows evaluated against the data quality rule. - * This field is only valid for rules of PER_ROW evaluation type. - * - * Generated from protobuf field int64 evaluated_row_count = 10; - * @return int|string - */ - public function getEvaluatedRowCount() - { - return $this->evaluated_row_count; - } - - /** - * The number of rows evaluated against the data quality rule. - * This field is only valid for rules of PER_ROW evaluation type. - * - * Generated from protobuf field int64 evaluated_row_count = 10; - * @param int|string $var - * @return $this - */ - public function setEvaluatedRowCount($var) - { - GPBUtil::checkInt64($var); - $this->evaluated_row_count = $var; - - return $this; - } - - /** - * The number of rows which passed a rule evaluation. - * This field is only valid for rules of PER_ROW evaluation type. - * - * Generated from protobuf field int64 passed_row_count = 11; - * @return int|string - */ - public function getPassedRowCount() - { - return $this->passed_row_count; - } - - /** - * The number of rows which passed a rule evaluation. - * This field is only valid for rules of PER_ROW evaluation type. - * - * Generated from protobuf field int64 passed_row_count = 11; - * @param int|string $var - * @return $this - */ - public function setPassedRowCount($var) - { - GPBUtil::checkInt64($var); - $this->passed_row_count = $var; - - return $this; - } - - /** - * The number of rows with null values in the specified column. - * - * Generated from protobuf field int64 null_row_count = 12; - * @return int|string - */ - public function getNullRowCount() - { - return $this->null_row_count; - } - - /** - * The number of rows with null values in the specified column. - * - * Generated from protobuf field int64 null_row_count = 12; - * @param int|string $var - * @return $this - */ - public function setNullRowCount($var) - { - GPBUtil::checkInt64($var); - $this->null_row_count = $var; - - return $this; - } - - /** - * The number of rows returned by the sql statement in the SqlAssertion rule. - * This field is only valid for SqlAssertion rules. - * - * Generated from protobuf field int64 assertion_row_count = 13; - * @return int|string - */ - public function getAssertionRowCount() - { - return $this->assertion_row_count; - } - - /** - * The number of rows returned by the sql statement in the SqlAssertion rule. - * This field is only valid for SqlAssertion rules. - * - * Generated from protobuf field int64 assertion_row_count = 13; - * @param int|string $var - * @return $this - */ - public function setAssertionRowCount($var) - { - GPBUtil::checkInt64($var); - $this->assertion_row_count = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityScanRuleResult/EvaluationType.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityScanRuleResult/EvaluationType.php deleted file mode 100644 index c683c18ffa95..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityScanRuleResult/EvaluationType.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.dataplex.v1.DataQualityScanRuleResult.EvaluationType - */ -class EvaluationType -{ - /** - * An unspecified evaluation type. - * - * Generated from protobuf enum EVALUATION_TYPE_UNSPECIFIED = 0; - */ - const EVALUATION_TYPE_UNSPECIFIED = 0; - /** - * The rule evaluation is done at per row level. - * - * Generated from protobuf enum PER_ROW = 1; - */ - const PER_ROW = 1; - /** - * The rule evaluation is done for an aggregate of rows. - * - * Generated from protobuf enum AGGREGATE = 2; - */ - const AGGREGATE = 2; - - private static $valueToName = [ - self::EVALUATION_TYPE_UNSPECIFIED => 'EVALUATION_TYPE_UNSPECIFIED', - self::PER_ROW => 'PER_ROW', - self::AGGREGATE => 'AGGREGATE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(EvaluationType::class, \Google\Cloud\Dataplex\V1\DataQualityScanRuleResult_EvaluationType::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityScanRuleResult/Result.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityScanRuleResult/Result.php deleted file mode 100644 index 6fc620d48942..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityScanRuleResult/Result.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.dataplex.v1.DataQualityScanRuleResult.Result - */ -class Result -{ - /** - * An unspecified result. - * - * Generated from protobuf enum RESULT_UNSPECIFIED = 0; - */ - const RESULT_UNSPECIFIED = 0; - /** - * The data quality rule passed. - * - * Generated from protobuf enum PASSED = 1; - */ - const PASSED = 1; - /** - * The data quality rule failed. - * - * Generated from protobuf enum FAILED = 2; - */ - const FAILED = 2; - - private static $valueToName = [ - self::RESULT_UNSPECIFIED => 'RESULT_UNSPECIFIED', - self::PASSED => 'PASSED', - self::FAILED => 'FAILED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Result::class, \Google\Cloud\Dataplex\V1\DataQualityScanRuleResult_Result::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityScanRuleResult/RuleType.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityScanRuleResult/RuleType.php deleted file mode 100644 index 85832072cb87..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualityScanRuleResult/RuleType.php +++ /dev/null @@ -1,122 +0,0 @@ -google.cloud.dataplex.v1.DataQualityScanRuleResult.RuleType - */ -class RuleType -{ - /** - * An unspecified rule type. - * - * Generated from protobuf enum RULE_TYPE_UNSPECIFIED = 0; - */ - const RULE_TYPE_UNSPECIFIED = 0; - /** - * Please see - * https://cloud.google.com/dataplex/docs/reference/rest/v1/DataQualityRule#nonnullexpectation. - * - * Generated from protobuf enum NON_NULL_EXPECTATION = 1; - */ - const NON_NULL_EXPECTATION = 1; - /** - * Please see - * https://cloud.google.com/dataplex/docs/reference/rest/v1/DataQualityRule#rangeexpectation. - * - * Generated from protobuf enum RANGE_EXPECTATION = 2; - */ - const RANGE_EXPECTATION = 2; - /** - * Please see - * https://cloud.google.com/dataplex/docs/reference/rest/v1/DataQualityRule#regexexpectation. - * - * Generated from protobuf enum REGEX_EXPECTATION = 3; - */ - const REGEX_EXPECTATION = 3; - /** - * Please see - * https://cloud.google.com/dataplex/docs/reference/rest/v1/DataQualityRule#rowconditionexpectation. - * - * Generated from protobuf enum ROW_CONDITION_EXPECTATION = 4; - */ - const ROW_CONDITION_EXPECTATION = 4; - /** - * Please see - * https://cloud.google.com/dataplex/docs/reference/rest/v1/DataQualityRule#setexpectation. - * - * Generated from protobuf enum SET_EXPECTATION = 5; - */ - const SET_EXPECTATION = 5; - /** - * Please see - * https://cloud.google.com/dataplex/docs/reference/rest/v1/DataQualityRule#statisticrangeexpectation. - * - * Generated from protobuf enum STATISTIC_RANGE_EXPECTATION = 6; - */ - const STATISTIC_RANGE_EXPECTATION = 6; - /** - * Please see - * https://cloud.google.com/dataplex/docs/reference/rest/v1/DataQualityRule#tableconditionexpectation. - * - * Generated from protobuf enum TABLE_CONDITION_EXPECTATION = 7; - */ - const TABLE_CONDITION_EXPECTATION = 7; - /** - * Please see - * https://cloud.google.com/dataplex/docs/reference/rest/v1/DataQualityRule#uniquenessexpectation. - * - * Generated from protobuf enum UNIQUENESS_EXPECTATION = 8; - */ - const UNIQUENESS_EXPECTATION = 8; - /** - * Please see - * https://cloud.google.com/dataplex/docs/reference/rest/v1/DataQualityRule#sqlAssertion. - * - * Generated from protobuf enum SQL_ASSERTION = 9; - */ - const SQL_ASSERTION = 9; - - private static $valueToName = [ - self::RULE_TYPE_UNSPECIFIED => 'RULE_TYPE_UNSPECIFIED', - self::NON_NULL_EXPECTATION => 'NON_NULL_EXPECTATION', - self::RANGE_EXPECTATION => 'RANGE_EXPECTATION', - self::REGEX_EXPECTATION => 'REGEX_EXPECTATION', - self::ROW_CONDITION_EXPECTATION => 'ROW_CONDITION_EXPECTATION', - self::SET_EXPECTATION => 'SET_EXPECTATION', - self::STATISTIC_RANGE_EXPECTATION => 'STATISTIC_RANGE_EXPECTATION', - self::TABLE_CONDITION_EXPECTATION => 'TABLE_CONDITION_EXPECTATION', - self::UNIQUENESS_EXPECTATION => 'UNIQUENESS_EXPECTATION', - self::SQL_ASSERTION => 'SQL_ASSERTION', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(RuleType::class, \Google\Cloud\Dataplex\V1\DataQualityScanRuleResult_RuleType::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualitySpec.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualitySpec.php deleted file mode 100644 index 45b23f54b8df..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualitySpec.php +++ /dev/null @@ -1,215 +0,0 @@ -google.cloud.dataplex.v1.DataQualitySpec - */ -class DataQualitySpec extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The list of rules to evaluate against a data source. At least one - * rule is required. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataQualityRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - private $rules; - /** - * Optional. The percentage of the records to be selected from the dataset for - * DataScan. - * * Value can range between 0.0 and 100.0 with up to 3 significant decimal - * digits. - * * Sampling is not applied if `sampling_percent` is not specified, 0 or - * 100. - * - * Generated from protobuf field float sampling_percent = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $sampling_percent = 0.0; - /** - * Optional. A filter applied to all rows in a single DataScan job. - * The filter needs to be a valid SQL expression for a WHERE clause in - * BigQuery standard SQL syntax. - * Example: col1 >= 0 AND col2 < 10 - * - * Generated from protobuf field string row_filter = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $row_filter = ''; - /** - * Optional. Actions to take upon job completion. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualitySpec.PostScanActions post_scan_actions = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $post_scan_actions = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Dataplex\V1\DataQualityRule>|\Google\Protobuf\Internal\RepeatedField $rules - * Required. The list of rules to evaluate against a data source. At least one - * rule is required. - * @type float $sampling_percent - * Optional. The percentage of the records to be selected from the dataset for - * DataScan. - * * Value can range between 0.0 and 100.0 with up to 3 significant decimal - * digits. - * * Sampling is not applied if `sampling_percent` is not specified, 0 or - * 100. - * @type string $row_filter - * Optional. A filter applied to all rows in a single DataScan job. - * The filter needs to be a valid SQL expression for a WHERE clause in - * BigQuery standard SQL syntax. - * Example: col1 >= 0 AND col2 < 10 - * @type \Google\Cloud\Dataplex\V1\DataQualitySpec\PostScanActions $post_scan_actions - * Optional. Actions to take upon job completion. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataQuality::initOnce(); - parent::__construct($data); - } - - /** - * Required. The list of rules to evaluate against a data source. At least one - * rule is required. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataQualityRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRules() - { - return $this->rules; - } - - /** - * Required. The list of rules to evaluate against a data source. At least one - * rule is required. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataQualityRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param array<\Google\Cloud\Dataplex\V1\DataQualityRule>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRules($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\DataQualityRule::class); - $this->rules = $arr; - - return $this; - } - - /** - * Optional. The percentage of the records to be selected from the dataset for - * DataScan. - * * Value can range between 0.0 and 100.0 with up to 3 significant decimal - * digits. - * * Sampling is not applied if `sampling_percent` is not specified, 0 or - * 100. - * - * Generated from protobuf field float sampling_percent = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return float - */ - public function getSamplingPercent() - { - return $this->sampling_percent; - } - - /** - * Optional. The percentage of the records to be selected from the dataset for - * DataScan. - * * Value can range between 0.0 and 100.0 with up to 3 significant decimal - * digits. - * * Sampling is not applied if `sampling_percent` is not specified, 0 or - * 100. - * - * Generated from protobuf field float sampling_percent = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param float $var - * @return $this - */ - public function setSamplingPercent($var) - { - GPBUtil::checkFloat($var); - $this->sampling_percent = $var; - - return $this; - } - - /** - * Optional. A filter applied to all rows in a single DataScan job. - * The filter needs to be a valid SQL expression for a WHERE clause in - * BigQuery standard SQL syntax. - * Example: col1 >= 0 AND col2 < 10 - * - * Generated from protobuf field string row_filter = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRowFilter() - { - return $this->row_filter; - } - - /** - * Optional. A filter applied to all rows in a single DataScan job. - * The filter needs to be a valid SQL expression for a WHERE clause in - * BigQuery standard SQL syntax. - * Example: col1 >= 0 AND col2 < 10 - * - * Generated from protobuf field string row_filter = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRowFilter($var) - { - GPBUtil::checkString($var, True); - $this->row_filter = $var; - - return $this; - } - - /** - * Optional. Actions to take upon job completion. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualitySpec.PostScanActions post_scan_actions = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataplex\V1\DataQualitySpec\PostScanActions|null - */ - public function getPostScanActions() - { - return $this->post_scan_actions; - } - - public function hasPostScanActions() - { - return isset($this->post_scan_actions); - } - - public function clearPostScanActions() - { - unset($this->post_scan_actions); - } - - /** - * Optional. Actions to take upon job completion. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualitySpec.PostScanActions post_scan_actions = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataplex\V1\DataQualitySpec\PostScanActions $var - * @return $this - */ - public function setPostScanActions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataQualitySpec\PostScanActions::class); - $this->post_scan_actions = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualitySpec/PostScanActions.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualitySpec/PostScanActions.php deleted file mode 100644 index 6bf0dee5c359..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualitySpec/PostScanActions.php +++ /dev/null @@ -1,132 +0,0 @@ -google.cloud.dataplex.v1.DataQualitySpec.PostScanActions - */ -class PostScanActions extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. If set, results will be exported to the provided BigQuery - * table. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport bigquery_export = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $bigquery_export = null; - /** - * Optional. If set, results will be sent to the provided notification - * receipts upon triggers. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport notification_report = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $notification_report = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dataplex\V1\DataQualitySpec\PostScanActions\BigQueryExport $bigquery_export - * Optional. If set, results will be exported to the provided BigQuery - * table. - * @type \Google\Cloud\Dataplex\V1\DataQualitySpec\PostScanActions\NotificationReport $notification_report - * Optional. If set, results will be sent to the provided notification - * receipts upon triggers. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataQuality::initOnce(); - parent::__construct($data); - } - - /** - * Optional. If set, results will be exported to the provided BigQuery - * table. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport bigquery_export = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataplex\V1\DataQualitySpec\PostScanActions\BigQueryExport|null - */ - public function getBigqueryExport() - { - return $this->bigquery_export; - } - - public function hasBigqueryExport() - { - return isset($this->bigquery_export); - } - - public function clearBigqueryExport() - { - unset($this->bigquery_export); - } - - /** - * Optional. If set, results will be exported to the provided BigQuery - * table. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport bigquery_export = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataplex\V1\DataQualitySpec\PostScanActions\BigQueryExport $var - * @return $this - */ - public function setBigqueryExport($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataQualitySpec\PostScanActions\BigQueryExport::class); - $this->bigquery_export = $var; - - return $this; - } - - /** - * Optional. If set, results will be sent to the provided notification - * receipts upon triggers. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport notification_report = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataplex\V1\DataQualitySpec\PostScanActions\NotificationReport|null - */ - public function getNotificationReport() - { - return $this->notification_report; - } - - public function hasNotificationReport() - { - return isset($this->notification_report); - } - - public function clearNotificationReport() - { - unset($this->notification_report); - } - - /** - * Optional. If set, results will be sent to the provided notification - * receipts upon triggers. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport notification_report = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataplex\V1\DataQualitySpec\PostScanActions\NotificationReport $var - * @return $this - */ - public function setNotificationReport($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataQualitySpec\PostScanActions\NotificationReport::class); - $this->notification_report = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(PostScanActions::class, \Google\Cloud\Dataplex\V1\DataQualitySpec_PostScanActions::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualitySpec/PostScanActions/BigQueryExport.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualitySpec/PostScanActions/BigQueryExport.php deleted file mode 100644 index 737ddd0e4ff8..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualitySpec/PostScanActions/BigQueryExport.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport - */ -class BigQueryExport extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The BigQuery table to export DataQualityScan results to. - * Format: - * //bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID - * - * Generated from protobuf field string results_table = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $results_table = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $results_table - * Optional. The BigQuery table to export DataQualityScan results to. - * Format: - * //bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataQuality::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The BigQuery table to export DataQualityScan results to. - * Format: - * //bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID - * - * Generated from protobuf field string results_table = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getResultsTable() - { - return $this->results_table; - } - - /** - * Optional. The BigQuery table to export DataQualityScan results to. - * Format: - * //bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID - * - * Generated from protobuf field string results_table = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setResultsTable($var) - { - GPBUtil::checkString($var, True); - $this->results_table = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(BigQueryExport::class, \Google\Cloud\Dataplex\V1\DataQualitySpec_PostScanActions_BigQueryExport::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualitySpec/PostScanActions/JobEndTrigger.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualitySpec/PostScanActions/JobEndTrigger.php deleted file mode 100644 index 3a40581b4de9..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualitySpec/PostScanActions/JobEndTrigger.php +++ /dev/null @@ -1,37 +0,0 @@ -google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobEndTrigger - */ -class JobEndTrigger extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataQuality::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(JobEndTrigger::class, \Google\Cloud\Dataplex\V1\DataQualitySpec_PostScanActions_JobEndTrigger::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualitySpec/PostScanActions/JobFailureTrigger.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualitySpec/PostScanActions/JobFailureTrigger.php deleted file mode 100644 index 826d89be0587..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualitySpec/PostScanActions/JobFailureTrigger.php +++ /dev/null @@ -1,37 +0,0 @@ -google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobFailureTrigger - */ -class JobFailureTrigger extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataQuality::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(JobFailureTrigger::class, \Google\Cloud\Dataplex\V1\DataQualitySpec_PostScanActions_JobFailureTrigger::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualitySpec/PostScanActions/NotificationReport.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualitySpec/PostScanActions/NotificationReport.php deleted file mode 100644 index ca40607c9716..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualitySpec/PostScanActions/NotificationReport.php +++ /dev/null @@ -1,212 +0,0 @@ -google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.NotificationReport - */ -class NotificationReport extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The recipients who will receive the notification report. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Recipients recipients = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $recipients = null; - /** - * Optional. If set, report will be sent when score threshold is met. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.ScoreThresholdTrigger score_threshold_trigger = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $score_threshold_trigger = null; - /** - * Optional. If set, report will be sent when a scan job fails. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobFailureTrigger job_failure_trigger = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $job_failure_trigger = null; - /** - * Optional. If set, report will be sent when a scan job ends. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobEndTrigger job_end_trigger = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $job_end_trigger = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dataplex\V1\DataQualitySpec\PostScanActions\Recipients $recipients - * Required. The recipients who will receive the notification report. - * @type \Google\Cloud\Dataplex\V1\DataQualitySpec\PostScanActions\ScoreThresholdTrigger $score_threshold_trigger - * Optional. If set, report will be sent when score threshold is met. - * @type \Google\Cloud\Dataplex\V1\DataQualitySpec\PostScanActions\JobFailureTrigger $job_failure_trigger - * Optional. If set, report will be sent when a scan job fails. - * @type \Google\Cloud\Dataplex\V1\DataQualitySpec\PostScanActions\JobEndTrigger $job_end_trigger - * Optional. If set, report will be sent when a scan job ends. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataQuality::initOnce(); - parent::__construct($data); - } - - /** - * Required. The recipients who will receive the notification report. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Recipients recipients = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataplex\V1\DataQualitySpec\PostScanActions\Recipients|null - */ - public function getRecipients() - { - return $this->recipients; - } - - public function hasRecipients() - { - return isset($this->recipients); - } - - public function clearRecipients() - { - unset($this->recipients); - } - - /** - * Required. The recipients who will receive the notification report. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Recipients recipients = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataplex\V1\DataQualitySpec\PostScanActions\Recipients $var - * @return $this - */ - public function setRecipients($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataQualitySpec\PostScanActions\Recipients::class); - $this->recipients = $var; - - return $this; - } - - /** - * Optional. If set, report will be sent when score threshold is met. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.ScoreThresholdTrigger score_threshold_trigger = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataplex\V1\DataQualitySpec\PostScanActions\ScoreThresholdTrigger|null - */ - public function getScoreThresholdTrigger() - { - return $this->score_threshold_trigger; - } - - public function hasScoreThresholdTrigger() - { - return isset($this->score_threshold_trigger); - } - - public function clearScoreThresholdTrigger() - { - unset($this->score_threshold_trigger); - } - - /** - * Optional. If set, report will be sent when score threshold is met. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.ScoreThresholdTrigger score_threshold_trigger = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataplex\V1\DataQualitySpec\PostScanActions\ScoreThresholdTrigger $var - * @return $this - */ - public function setScoreThresholdTrigger($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataQualitySpec\PostScanActions\ScoreThresholdTrigger::class); - $this->score_threshold_trigger = $var; - - return $this; - } - - /** - * Optional. If set, report will be sent when a scan job fails. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobFailureTrigger job_failure_trigger = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataplex\V1\DataQualitySpec\PostScanActions\JobFailureTrigger|null - */ - public function getJobFailureTrigger() - { - return $this->job_failure_trigger; - } - - public function hasJobFailureTrigger() - { - return isset($this->job_failure_trigger); - } - - public function clearJobFailureTrigger() - { - unset($this->job_failure_trigger); - } - - /** - * Optional. If set, report will be sent when a scan job fails. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobFailureTrigger job_failure_trigger = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataplex\V1\DataQualitySpec\PostScanActions\JobFailureTrigger $var - * @return $this - */ - public function setJobFailureTrigger($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataQualitySpec\PostScanActions\JobFailureTrigger::class); - $this->job_failure_trigger = $var; - - return $this; - } - - /** - * Optional. If set, report will be sent when a scan job ends. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobEndTrigger job_end_trigger = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataplex\V1\DataQualitySpec\PostScanActions\JobEndTrigger|null - */ - public function getJobEndTrigger() - { - return $this->job_end_trigger; - } - - public function hasJobEndTrigger() - { - return isset($this->job_end_trigger); - } - - public function clearJobEndTrigger() - { - unset($this->job_end_trigger); - } - - /** - * Optional. If set, report will be sent when a scan job ends. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.JobEndTrigger job_end_trigger = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataplex\V1\DataQualitySpec\PostScanActions\JobEndTrigger $var - * @return $this - */ - public function setJobEndTrigger($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataQualitySpec\PostScanActions\JobEndTrigger::class); - $this->job_end_trigger = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(NotificationReport::class, \Google\Cloud\Dataplex\V1\DataQualitySpec_PostScanActions_NotificationReport::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualitySpec/PostScanActions/Recipients.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualitySpec/PostScanActions/Recipients.php deleted file mode 100644 index 497ac2f0eec3..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualitySpec/PostScanActions/Recipients.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Recipients - */ -class Recipients extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The email recipients who will receive the DataQualityScan - * results report. - * - * Generated from protobuf field repeated string emails = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $emails; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $emails - * Optional. The email recipients who will receive the DataQualityScan - * results report. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataQuality::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The email recipients who will receive the DataQualityScan - * results report. - * - * Generated from protobuf field repeated string emails = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEmails() - { - return $this->emails; - } - - /** - * Optional. The email recipients who will receive the DataQualityScan - * results report. - * - * Generated from protobuf field repeated string emails = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEmails($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->emails = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Recipients::class, \Google\Cloud\Dataplex\V1\DataQualitySpec_PostScanActions_Recipients::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualitySpec/PostScanActions/ScoreThresholdTrigger.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualitySpec/PostScanActions/ScoreThresholdTrigger.php deleted file mode 100644 index a5d1f1407bcb..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataQualitySpec/PostScanActions/ScoreThresholdTrigger.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.ScoreThresholdTrigger - */ -class ScoreThresholdTrigger extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The score range is in [0,100]. - * - * Generated from protobuf field float score_threshold = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $score_threshold = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $score_threshold - * Optional. The score range is in [0,100]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataQuality::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The score range is in [0,100]. - * - * Generated from protobuf field float score_threshold = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return float - */ - public function getScoreThreshold() - { - return $this->score_threshold; - } - - /** - * Optional. The score range is in [0,100]. - * - * Generated from protobuf field float score_threshold = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param float $var - * @return $this - */ - public function setScoreThreshold($var) - { - GPBUtil::checkFloat($var); - $this->score_threshold = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ScoreThresholdTrigger::class, \Google\Cloud\Dataplex\V1\DataQualitySpec_PostScanActions_ScoreThresholdTrigger::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScan.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScan.php deleted file mode 100644 index 8f54f065081e..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScan.php +++ /dev/null @@ -1,676 +0,0 @@ -google.cloud.dataplex.v1.DataScan - */ -class DataScan extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The relative resource name of the scan, of the form: - * `projects/{project}/locations/{location_id}/dataScans/{datascan_id}`, - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. System generated globally unique ID for the scan. This ID will - * be different if the scan is deleted and re-created with the same name. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - /** - * Optional. Description of the scan. - * * Must be between 1-1024 characters. - * - * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Optional. User friendly display name. - * * Must be between 1-256 characters. - * - * Generated from protobuf field string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $display_name = ''; - /** - * Optional. User-defined labels for the scan. - * - * Generated from protobuf field map labels = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * Output only. Current state of the DataScan. - * - * Generated from protobuf field .google.cloud.dataplex.v1.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. The time when the scan was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time when the scan was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Required. The data source for DataScan. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataSource data = 9 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $data = null; - /** - * Optional. DataScan execution settings. - * If not specified, the fields in it will use their default values. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScan.ExecutionSpec execution_spec = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $execution_spec = null; - /** - * Output only. Status of the data scan execution. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScan.ExecutionStatus execution_status = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $execution_status = null; - /** - * Output only. The type of DataScan. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScanType type = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $type = 0; - protected $spec; - protected $result; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The relative resource name of the scan, of the form: - * `projects/{project}/locations/{location_id}/dataScans/{datascan_id}`, - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * @type string $uid - * Output only. System generated globally unique ID for the scan. This ID will - * be different if the scan is deleted and re-created with the same name. - * @type string $description - * Optional. Description of the scan. - * * Must be between 1-1024 characters. - * @type string $display_name - * Optional. User friendly display name. - * * Must be between 1-256 characters. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. User-defined labels for the scan. - * @type int $state - * Output only. Current state of the DataScan. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time when the scan was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time when the scan was last updated. - * @type \Google\Cloud\Dataplex\V1\DataSource $data - * Required. The data source for DataScan. - * @type \Google\Cloud\Dataplex\V1\DataScan\ExecutionSpec $execution_spec - * Optional. DataScan execution settings. - * If not specified, the fields in it will use their default values. - * @type \Google\Cloud\Dataplex\V1\DataScan\ExecutionStatus $execution_status - * Output only. Status of the data scan execution. - * @type int $type - * Output only. The type of DataScan. - * @type \Google\Cloud\Dataplex\V1\DataQualitySpec $data_quality_spec - * DataQualityScan related setting. - * @type \Google\Cloud\Dataplex\V1\DataProfileSpec $data_profile_spec - * DataProfileScan related setting. - * @type \Google\Cloud\Dataplex\V1\DataQualityResult $data_quality_result - * Output only. The result of the data quality scan. - * @type \Google\Cloud\Dataplex\V1\DataProfileResult $data_profile_result - * Output only. The result of the data profile scan. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Datascans::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The relative resource name of the scan, of the form: - * `projects/{project}/locations/{location_id}/dataScans/{datascan_id}`, - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The relative resource name of the scan, of the form: - * `projects/{project}/locations/{location_id}/dataScans/{datascan_id}`, - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. System generated globally unique ID for the scan. This ID will - * be different if the scan is deleted and re-created with the same name. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. System generated globally unique ID for the scan. This ID will - * be different if the scan is deleted and re-created with the same name. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - - /** - * Optional. Description of the scan. - * * Must be between 1-1024 characters. - * - * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. Description of the scan. - * * Must be between 1-1024 characters. - * - * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Optional. User friendly display name. - * * Must be between 1-256 characters. - * - * Generated from protobuf field string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Optional. User friendly display name. - * * Must be between 1-256 characters. - * - * Generated from protobuf field string display_name = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Optional. User-defined labels for the scan. - * - * Generated from protobuf field map labels = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. User-defined labels for the scan. - * - * Generated from protobuf field map labels = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Output only. Current state of the DataScan. - * - * Generated from protobuf field .google.cloud.dataplex.v1.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. Current state of the DataScan. - * - * Generated from protobuf field .google.cloud.dataplex.v1.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. The time when the scan was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time when the scan was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The time when the scan was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The time when the scan was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Required. The data source for DataScan. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataSource data = 9 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataplex\V1\DataSource|null - */ - public function getData() - { - return $this->data; - } - - public function hasData() - { - return isset($this->data); - } - - public function clearData() - { - unset($this->data); - } - - /** - * Required. The data source for DataScan. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataSource data = 9 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataplex\V1\DataSource $var - * @return $this - */ - public function setData($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataSource::class); - $this->data = $var; - - return $this; - } - - /** - * Optional. DataScan execution settings. - * If not specified, the fields in it will use their default values. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScan.ExecutionSpec execution_spec = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataplex\V1\DataScan\ExecutionSpec|null - */ - public function getExecutionSpec() - { - return $this->execution_spec; - } - - public function hasExecutionSpec() - { - return isset($this->execution_spec); - } - - public function clearExecutionSpec() - { - unset($this->execution_spec); - } - - /** - * Optional. DataScan execution settings. - * If not specified, the fields in it will use their default values. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScan.ExecutionSpec execution_spec = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataplex\V1\DataScan\ExecutionSpec $var - * @return $this - */ - public function setExecutionSpec($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataScan\ExecutionSpec::class); - $this->execution_spec = $var; - - return $this; - } - - /** - * Output only. Status of the data scan execution. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScan.ExecutionStatus execution_status = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Dataplex\V1\DataScan\ExecutionStatus|null - */ - public function getExecutionStatus() - { - return $this->execution_status; - } - - public function hasExecutionStatus() - { - return isset($this->execution_status); - } - - public function clearExecutionStatus() - { - unset($this->execution_status); - } - - /** - * Output only. Status of the data scan execution. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScan.ExecutionStatus execution_status = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Dataplex\V1\DataScan\ExecutionStatus $var - * @return $this - */ - public function setExecutionStatus($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataScan\ExecutionStatus::class); - $this->execution_status = $var; - - return $this; - } - - /** - * Output only. The type of DataScan. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScanType type = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Output only. The type of DataScan. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScanType type = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\DataScanType::class); - $this->type = $var; - - return $this; - } - - /** - * DataQualityScan related setting. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualitySpec data_quality_spec = 100; - * @return \Google\Cloud\Dataplex\V1\DataQualitySpec|null - */ - public function getDataQualitySpec() - { - return $this->readOneof(100); - } - - public function hasDataQualitySpec() - { - return $this->hasOneof(100); - } - - /** - * DataQualityScan related setting. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualitySpec data_quality_spec = 100; - * @param \Google\Cloud\Dataplex\V1\DataQualitySpec $var - * @return $this - */ - public function setDataQualitySpec($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataQualitySpec::class); - $this->writeOneof(100, $var); - - return $this; - } - - /** - * DataProfileScan related setting. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileSpec data_profile_spec = 101; - * @return \Google\Cloud\Dataplex\V1\DataProfileSpec|null - */ - public function getDataProfileSpec() - { - return $this->readOneof(101); - } - - public function hasDataProfileSpec() - { - return $this->hasOneof(101); - } - - /** - * DataProfileScan related setting. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileSpec data_profile_spec = 101; - * @param \Google\Cloud\Dataplex\V1\DataProfileSpec $var - * @return $this - */ - public function setDataProfileSpec($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataProfileSpec::class); - $this->writeOneof(101, $var); - - return $this; - } - - /** - * Output only. The result of the data quality scan. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityResult data_quality_result = 200 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Dataplex\V1\DataQualityResult|null - */ - public function getDataQualityResult() - { - return $this->readOneof(200); - } - - public function hasDataQualityResult() - { - return $this->hasOneof(200); - } - - /** - * Output only. The result of the data quality scan. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityResult data_quality_result = 200 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Dataplex\V1\DataQualityResult $var - * @return $this - */ - public function setDataQualityResult($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataQualityResult::class); - $this->writeOneof(200, $var); - - return $this; - } - - /** - * Output only. The result of the data profile scan. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileResult data_profile_result = 201 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Dataplex\V1\DataProfileResult|null - */ - public function getDataProfileResult() - { - return $this->readOneof(201); - } - - public function hasDataProfileResult() - { - return $this->hasOneof(201); - } - - /** - * Output only. The result of the data profile scan. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileResult data_profile_result = 201 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Dataplex\V1\DataProfileResult $var - * @return $this - */ - public function setDataProfileResult($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataProfileResult::class); - $this->writeOneof(201, $var); - - return $this; - } - - /** - * @return string - */ - public function getSpec() - { - return $this->whichOneof("spec"); - } - - /** - * @return string - */ - public function getResult() - { - return $this->whichOneof("result"); - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScan/ExecutionSpec.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScan/ExecutionSpec.php deleted file mode 100644 index 553204435b15..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScan/ExecutionSpec.php +++ /dev/null @@ -1,136 +0,0 @@ -google.cloud.dataplex.v1.DataScan.ExecutionSpec - */ -class ExecutionSpec extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Spec related to how often and when a scan should be triggered. - * If not specified, the default is `OnDemand`, which means the scan will - * not run until the user calls `RunDataScan` API. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Trigger trigger = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $trigger = null; - protected $incremental; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dataplex\V1\Trigger $trigger - * Optional. Spec related to how often and when a scan should be triggered. - * If not specified, the default is `OnDemand`, which means the scan will - * not run until the user calls `RunDataScan` API. - * @type string $field - * Immutable. The unnested field (of type *Date* or *Timestamp*) that - * contains values which monotonically increase over time. - * If not specified, a data scan will run for all data in the table. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Datascans::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Spec related to how often and when a scan should be triggered. - * If not specified, the default is `OnDemand`, which means the scan will - * not run until the user calls `RunDataScan` API. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Trigger trigger = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataplex\V1\Trigger|null - */ - public function getTrigger() - { - return $this->trigger; - } - - public function hasTrigger() - { - return isset($this->trigger); - } - - public function clearTrigger() - { - unset($this->trigger); - } - - /** - * Optional. Spec related to how often and when a scan should be triggered. - * If not specified, the default is `OnDemand`, which means the scan will - * not run until the user calls `RunDataScan` API. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Trigger trigger = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataplex\V1\Trigger $var - * @return $this - */ - public function setTrigger($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Trigger::class); - $this->trigger = $var; - - return $this; - } - - /** - * Immutable. The unnested field (of type *Date* or *Timestamp*) that - * contains values which monotonically increase over time. - * If not specified, a data scan will run for all data in the table. - * - * Generated from protobuf field string field = 100 [(.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getField() - { - return $this->readOneof(100); - } - - public function hasField() - { - return $this->hasOneof(100); - } - - /** - * Immutable. The unnested field (of type *Date* or *Timestamp*) that - * contains values which monotonically increase over time. - * If not specified, a data scan will run for all data in the table. - * - * Generated from protobuf field string field = 100 [(.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setField($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(100, $var); - - return $this; - } - - /** - * @return string - */ - public function getIncremental() - { - return $this->whichOneof("incremental"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ExecutionSpec::class, \Google\Cloud\Dataplex\V1\DataScan_ExecutionSpec::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScan/ExecutionStatus.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScan/ExecutionStatus.php deleted file mode 100644 index f9f827047242..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScan/ExecutionStatus.php +++ /dev/null @@ -1,124 +0,0 @@ -google.cloud.dataplex.v1.DataScan.ExecutionStatus - */ -class ExecutionStatus extends \Google\Protobuf\Internal\Message -{ - /** - * The time when the latest DataScanJob started. - * - * Generated from protobuf field .google.protobuf.Timestamp latest_job_start_time = 4; - */ - protected $latest_job_start_time = null; - /** - * The time when the latest DataScanJob ended. - * - * Generated from protobuf field .google.protobuf.Timestamp latest_job_end_time = 5; - */ - protected $latest_job_end_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $latest_job_start_time - * The time when the latest DataScanJob started. - * @type \Google\Protobuf\Timestamp $latest_job_end_time - * The time when the latest DataScanJob ended. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Datascans::initOnce(); - parent::__construct($data); - } - - /** - * The time when the latest DataScanJob started. - * - * Generated from protobuf field .google.protobuf.Timestamp latest_job_start_time = 4; - * @return \Google\Protobuf\Timestamp|null - */ - public function getLatestJobStartTime() - { - return $this->latest_job_start_time; - } - - public function hasLatestJobStartTime() - { - return isset($this->latest_job_start_time); - } - - public function clearLatestJobStartTime() - { - unset($this->latest_job_start_time); - } - - /** - * The time when the latest DataScanJob started. - * - * Generated from protobuf field .google.protobuf.Timestamp latest_job_start_time = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setLatestJobStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->latest_job_start_time = $var; - - return $this; - } - - /** - * The time when the latest DataScanJob ended. - * - * Generated from protobuf field .google.protobuf.Timestamp latest_job_end_time = 5; - * @return \Google\Protobuf\Timestamp|null - */ - public function getLatestJobEndTime() - { - return $this->latest_job_end_time; - } - - public function hasLatestJobEndTime() - { - return isset($this->latest_job_end_time); - } - - public function clearLatestJobEndTime() - { - unset($this->latest_job_end_time); - } - - /** - * The time when the latest DataScanJob ended. - * - * Generated from protobuf field .google.protobuf.Timestamp latest_job_end_time = 5; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setLatestJobEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->latest_job_end_time = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ExecutionStatus::class, \Google\Cloud\Dataplex\V1\DataScan_ExecutionStatus::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent.php deleted file mode 100644 index d4263d16f7ac..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent.php +++ /dev/null @@ -1,633 +0,0 @@ -google.cloud.dataplex.v1.DataScanEvent - */ -class DataScanEvent extends \Google\Protobuf\Internal\Message -{ - /** - * The data source of the data scan - * - * Generated from protobuf field string data_source = 1; - */ - protected $data_source = ''; - /** - * The identifier of the specific data scan job this log entry is for. - * - * Generated from protobuf field string job_id = 2; - */ - protected $job_id = ''; - /** - * The time when the data scan job was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 12; - */ - protected $create_time = null; - /** - * The time when the data scan job started to run. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 3; - */ - protected $start_time = null; - /** - * The time when the data scan job finished. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 4; - */ - protected $end_time = null; - /** - * The type of the data scan. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScanEvent.ScanType type = 5; - */ - protected $type = 0; - /** - * The status of the data scan job. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScanEvent.State state = 6; - */ - protected $state = 0; - /** - * The message describing the data scan job event. - * - * Generated from protobuf field string message = 7; - */ - protected $message = ''; - /** - * A version identifier of the spec which was used to execute this job. - * - * Generated from protobuf field string spec_version = 8; - */ - protected $spec_version = ''; - /** - * The trigger type of the data scan job. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScanEvent.Trigger trigger = 9; - */ - protected $trigger = 0; - /** - * The scope of the data scan (e.g. full, incremental). - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScanEvent.Scope scope = 10; - */ - protected $scope = 0; - /** - * The result of post scan actions. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult post_scan_actions_result = 11; - */ - protected $post_scan_actions_result = null; - protected $result; - protected $appliedConfigs; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $data_source - * The data source of the data scan - * @type string $job_id - * The identifier of the specific data scan job this log entry is for. - * @type \Google\Protobuf\Timestamp $create_time - * The time when the data scan job was created. - * @type \Google\Protobuf\Timestamp $start_time - * The time when the data scan job started to run. - * @type \Google\Protobuf\Timestamp $end_time - * The time when the data scan job finished. - * @type int $type - * The type of the data scan. - * @type int $state - * The status of the data scan job. - * @type string $message - * The message describing the data scan job event. - * @type string $spec_version - * A version identifier of the spec which was used to execute this job. - * @type int $trigger - * The trigger type of the data scan job. - * @type int $scope - * The scope of the data scan (e.g. full, incremental). - * @type \Google\Cloud\Dataplex\V1\DataScanEvent\DataProfileResult $data_profile - * Data profile result for data profile type data scan. - * @type \Google\Cloud\Dataplex\V1\DataScanEvent\DataQualityResult $data_quality - * Data quality result for data quality type data scan. - * @type \Google\Cloud\Dataplex\V1\DataScanEvent\DataProfileAppliedConfigs $data_profile_configs - * Applied configs for data profile type data scan. - * @type \Google\Cloud\Dataplex\V1\DataScanEvent\DataQualityAppliedConfigs $data_quality_configs - * Applied configs for data quality type data scan. - * @type \Google\Cloud\Dataplex\V1\DataScanEvent\PostScanActionsResult $post_scan_actions_result - * The result of post scan actions. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Logs::initOnce(); - parent::__construct($data); - } - - /** - * The data source of the data scan - * - * Generated from protobuf field string data_source = 1; - * @return string - */ - public function getDataSource() - { - return $this->data_source; - } - - /** - * The data source of the data scan - * - * Generated from protobuf field string data_source = 1; - * @param string $var - * @return $this - */ - public function setDataSource($var) - { - GPBUtil::checkString($var, True); - $this->data_source = $var; - - return $this; - } - - /** - * The identifier of the specific data scan job this log entry is for. - * - * Generated from protobuf field string job_id = 2; - * @return string - */ - public function getJobId() - { - return $this->job_id; - } - - /** - * The identifier of the specific data scan job this log entry is for. - * - * Generated from protobuf field string job_id = 2; - * @param string $var - * @return $this - */ - public function setJobId($var) - { - GPBUtil::checkString($var, True); - $this->job_id = $var; - - return $this; - } - - /** - * The time when the data scan job was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 12; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * The time when the data scan job was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 12; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * The time when the data scan job started to run. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 3; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStartTime() - { - return $this->start_time; - } - - public function hasStartTime() - { - return isset($this->start_time); - } - - public function clearStartTime() - { - unset($this->start_time); - } - - /** - * The time when the data scan job started to run. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * The time when the data scan job finished. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 4; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * The time when the data scan job finished. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * The type of the data scan. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScanEvent.ScanType type = 5; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * The type of the data scan. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScanEvent.ScanType type = 5; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\DataScanEvent\ScanType::class); - $this->type = $var; - - return $this; - } - - /** - * The status of the data scan job. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScanEvent.State state = 6; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * The status of the data scan job. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScanEvent.State state = 6; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\DataScanEvent\State::class); - $this->state = $var; - - return $this; - } - - /** - * The message describing the data scan job event. - * - * Generated from protobuf field string message = 7; - * @return string - */ - public function getMessage() - { - return $this->message; - } - - /** - * The message describing the data scan job event. - * - * Generated from protobuf field string message = 7; - * @param string $var - * @return $this - */ - public function setMessage($var) - { - GPBUtil::checkString($var, True); - $this->message = $var; - - return $this; - } - - /** - * A version identifier of the spec which was used to execute this job. - * - * Generated from protobuf field string spec_version = 8; - * @return string - */ - public function getSpecVersion() - { - return $this->spec_version; - } - - /** - * A version identifier of the spec which was used to execute this job. - * - * Generated from protobuf field string spec_version = 8; - * @param string $var - * @return $this - */ - public function setSpecVersion($var) - { - GPBUtil::checkString($var, True); - $this->spec_version = $var; - - return $this; - } - - /** - * The trigger type of the data scan job. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScanEvent.Trigger trigger = 9; - * @return int - */ - public function getTrigger() - { - return $this->trigger; - } - - /** - * The trigger type of the data scan job. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScanEvent.Trigger trigger = 9; - * @param int $var - * @return $this - */ - public function setTrigger($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\DataScanEvent\Trigger::class); - $this->trigger = $var; - - return $this; - } - - /** - * The scope of the data scan (e.g. full, incremental). - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScanEvent.Scope scope = 10; - * @return int - */ - public function getScope() - { - return $this->scope; - } - - /** - * The scope of the data scan (e.g. full, incremental). - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScanEvent.Scope scope = 10; - * @param int $var - * @return $this - */ - public function setScope($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\DataScanEvent\Scope::class); - $this->scope = $var; - - return $this; - } - - /** - * Data profile result for data profile type data scan. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScanEvent.DataProfileResult data_profile = 101; - * @return \Google\Cloud\Dataplex\V1\DataScanEvent\DataProfileResult|null - */ - public function getDataProfile() - { - return $this->readOneof(101); - } - - public function hasDataProfile() - { - return $this->hasOneof(101); - } - - /** - * Data profile result for data profile type data scan. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScanEvent.DataProfileResult data_profile = 101; - * @param \Google\Cloud\Dataplex\V1\DataScanEvent\DataProfileResult $var - * @return $this - */ - public function setDataProfile($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataScanEvent\DataProfileResult::class); - $this->writeOneof(101, $var); - - return $this; - } - - /** - * Data quality result for data quality type data scan. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScanEvent.DataQualityResult data_quality = 102; - * @return \Google\Cloud\Dataplex\V1\DataScanEvent\DataQualityResult|null - */ - public function getDataQuality() - { - return $this->readOneof(102); - } - - public function hasDataQuality() - { - return $this->hasOneof(102); - } - - /** - * Data quality result for data quality type data scan. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScanEvent.DataQualityResult data_quality = 102; - * @param \Google\Cloud\Dataplex\V1\DataScanEvent\DataQualityResult $var - * @return $this - */ - public function setDataQuality($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataScanEvent\DataQualityResult::class); - $this->writeOneof(102, $var); - - return $this; - } - - /** - * Applied configs for data profile type data scan. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs data_profile_configs = 201; - * @return \Google\Cloud\Dataplex\V1\DataScanEvent\DataProfileAppliedConfigs|null - */ - public function getDataProfileConfigs() - { - return $this->readOneof(201); - } - - public function hasDataProfileConfigs() - { - return $this->hasOneof(201); - } - - /** - * Applied configs for data profile type data scan. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs data_profile_configs = 201; - * @param \Google\Cloud\Dataplex\V1\DataScanEvent\DataProfileAppliedConfigs $var - * @return $this - */ - public function setDataProfileConfigs($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataScanEvent\DataProfileAppliedConfigs::class); - $this->writeOneof(201, $var); - - return $this; - } - - /** - * Applied configs for data quality type data scan. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs data_quality_configs = 202; - * @return \Google\Cloud\Dataplex\V1\DataScanEvent\DataQualityAppliedConfigs|null - */ - public function getDataQualityConfigs() - { - return $this->readOneof(202); - } - - public function hasDataQualityConfigs() - { - return $this->hasOneof(202); - } - - /** - * Applied configs for data quality type data scan. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs data_quality_configs = 202; - * @param \Google\Cloud\Dataplex\V1\DataScanEvent\DataQualityAppliedConfigs $var - * @return $this - */ - public function setDataQualityConfigs($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataScanEvent\DataQualityAppliedConfigs::class); - $this->writeOneof(202, $var); - - return $this; - } - - /** - * The result of post scan actions. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult post_scan_actions_result = 11; - * @return \Google\Cloud\Dataplex\V1\DataScanEvent\PostScanActionsResult|null - */ - public function getPostScanActionsResult() - { - return $this->post_scan_actions_result; - } - - public function hasPostScanActionsResult() - { - return isset($this->post_scan_actions_result); - } - - public function clearPostScanActionsResult() - { - unset($this->post_scan_actions_result); - } - - /** - * The result of post scan actions. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult post_scan_actions_result = 11; - * @param \Google\Cloud\Dataplex\V1\DataScanEvent\PostScanActionsResult $var - * @return $this - */ - public function setPostScanActionsResult($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataScanEvent\PostScanActionsResult::class); - $this->post_scan_actions_result = $var; - - return $this; - } - - /** - * @return string - */ - public function getResult() - { - return $this->whichOneof("result"); - } - - /** - * @return string - */ - public function getAppliedConfigs() - { - return $this->whichOneof("appliedConfigs"); - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/DataProfileAppliedConfigs.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/DataProfileAppliedConfigs.php deleted file mode 100644 index 61dcc852f43c..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/DataProfileAppliedConfigs.php +++ /dev/null @@ -1,150 +0,0 @@ -google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs - */ -class DataProfileAppliedConfigs extends \Google\Protobuf\Internal\Message -{ - /** - * The percentage of the records selected from the dataset for DataScan. - * * Value ranges between 0.0 and 100.0. - * * Value 0.0 or 100.0 imply that sampling was not applied. - * - * Generated from protobuf field float sampling_percent = 1; - */ - protected $sampling_percent = 0.0; - /** - * Boolean indicating whether a row filter was applied in the DataScan job. - * - * Generated from protobuf field bool row_filter_applied = 2; - */ - protected $row_filter_applied = false; - /** - * Boolean indicating whether a column filter was applied in the DataScan - * job. - * - * Generated from protobuf field bool column_filter_applied = 3; - */ - protected $column_filter_applied = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $sampling_percent - * The percentage of the records selected from the dataset for DataScan. - * * Value ranges between 0.0 and 100.0. - * * Value 0.0 or 100.0 imply that sampling was not applied. - * @type bool $row_filter_applied - * Boolean indicating whether a row filter was applied in the DataScan job. - * @type bool $column_filter_applied - * Boolean indicating whether a column filter was applied in the DataScan - * job. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Logs::initOnce(); - parent::__construct($data); - } - - /** - * The percentage of the records selected from the dataset for DataScan. - * * Value ranges between 0.0 and 100.0. - * * Value 0.0 or 100.0 imply that sampling was not applied. - * - * Generated from protobuf field float sampling_percent = 1; - * @return float - */ - public function getSamplingPercent() - { - return $this->sampling_percent; - } - - /** - * The percentage of the records selected from the dataset for DataScan. - * * Value ranges between 0.0 and 100.0. - * * Value 0.0 or 100.0 imply that sampling was not applied. - * - * Generated from protobuf field float sampling_percent = 1; - * @param float $var - * @return $this - */ - public function setSamplingPercent($var) - { - GPBUtil::checkFloat($var); - $this->sampling_percent = $var; - - return $this; - } - - /** - * Boolean indicating whether a row filter was applied in the DataScan job. - * - * Generated from protobuf field bool row_filter_applied = 2; - * @return bool - */ - public function getRowFilterApplied() - { - return $this->row_filter_applied; - } - - /** - * Boolean indicating whether a row filter was applied in the DataScan job. - * - * Generated from protobuf field bool row_filter_applied = 2; - * @param bool $var - * @return $this - */ - public function setRowFilterApplied($var) - { - GPBUtil::checkBool($var); - $this->row_filter_applied = $var; - - return $this; - } - - /** - * Boolean indicating whether a column filter was applied in the DataScan - * job. - * - * Generated from protobuf field bool column_filter_applied = 3; - * @return bool - */ - public function getColumnFilterApplied() - { - return $this->column_filter_applied; - } - - /** - * Boolean indicating whether a column filter was applied in the DataScan - * job. - * - * Generated from protobuf field bool column_filter_applied = 3; - * @param bool $var - * @return $this - */ - public function setColumnFilterApplied($var) - { - GPBUtil::checkBool($var); - $this->column_filter_applied = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DataProfileAppliedConfigs::class, \Google\Cloud\Dataplex\V1\DataScanEvent_DataProfileAppliedConfigs::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/DataProfileResult.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/DataProfileResult.php deleted file mode 100644 index 90adffac7a98..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/DataProfileResult.php +++ /dev/null @@ -1,70 +0,0 @@ -google.cloud.dataplex.v1.DataScanEvent.DataProfileResult - */ -class DataProfileResult extends \Google\Protobuf\Internal\Message -{ - /** - * The count of rows processed in the data scan job. - * - * Generated from protobuf field int64 row_count = 1; - */ - protected $row_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $row_count - * The count of rows processed in the data scan job. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Logs::initOnce(); - parent::__construct($data); - } - - /** - * The count of rows processed in the data scan job. - * - * Generated from protobuf field int64 row_count = 1; - * @return int|string - */ - public function getRowCount() - { - return $this->row_count; - } - - /** - * The count of rows processed in the data scan job. - * - * Generated from protobuf field int64 row_count = 1; - * @param int|string $var - * @return $this - */ - public function setRowCount($var) - { - GPBUtil::checkInt64($var); - $this->row_count = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DataProfileResult::class, \Google\Cloud\Dataplex\V1\DataScanEvent_DataProfileResult::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/DataQualityAppliedConfigs.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/DataQualityAppliedConfigs.php deleted file mode 100644 index 345a434d0e4b..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/DataQualityAppliedConfigs.php +++ /dev/null @@ -1,112 +0,0 @@ -google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs - */ -class DataQualityAppliedConfigs extends \Google\Protobuf\Internal\Message -{ - /** - * The percentage of the records selected from the dataset for DataScan. - * * Value ranges between 0.0 and 100.0. - * * Value 0.0 or 100.0 imply that sampling was not applied. - * - * Generated from protobuf field float sampling_percent = 1; - */ - protected $sampling_percent = 0.0; - /** - * Boolean indicating whether a row filter was applied in the DataScan job. - * - * Generated from protobuf field bool row_filter_applied = 2; - */ - protected $row_filter_applied = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $sampling_percent - * The percentage of the records selected from the dataset for DataScan. - * * Value ranges between 0.0 and 100.0. - * * Value 0.0 or 100.0 imply that sampling was not applied. - * @type bool $row_filter_applied - * Boolean indicating whether a row filter was applied in the DataScan job. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Logs::initOnce(); - parent::__construct($data); - } - - /** - * The percentage of the records selected from the dataset for DataScan. - * * Value ranges between 0.0 and 100.0. - * * Value 0.0 or 100.0 imply that sampling was not applied. - * - * Generated from protobuf field float sampling_percent = 1; - * @return float - */ - public function getSamplingPercent() - { - return $this->sampling_percent; - } - - /** - * The percentage of the records selected from the dataset for DataScan. - * * Value ranges between 0.0 and 100.0. - * * Value 0.0 or 100.0 imply that sampling was not applied. - * - * Generated from protobuf field float sampling_percent = 1; - * @param float $var - * @return $this - */ - public function setSamplingPercent($var) - { - GPBUtil::checkFloat($var); - $this->sampling_percent = $var; - - return $this; - } - - /** - * Boolean indicating whether a row filter was applied in the DataScan job. - * - * Generated from protobuf field bool row_filter_applied = 2; - * @return bool - */ - public function getRowFilterApplied() - { - return $this->row_filter_applied; - } - - /** - * Boolean indicating whether a row filter was applied in the DataScan job. - * - * Generated from protobuf field bool row_filter_applied = 2; - * @param bool $var - * @return $this - */ - public function setRowFilterApplied($var) - { - GPBUtil::checkBool($var); - $this->row_filter_applied = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DataQualityAppliedConfigs::class, \Google\Cloud\Dataplex\V1\DataScanEvent_DataQualityAppliedConfigs::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/DataQualityResult.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/DataQualityResult.php deleted file mode 100644 index 171f7d9baf54..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/DataQualityResult.php +++ /dev/null @@ -1,292 +0,0 @@ -google.cloud.dataplex.v1.DataScanEvent.DataQualityResult - */ -class DataQualityResult extends \Google\Protobuf\Internal\Message -{ - /** - * The count of rows processed in the data scan job. - * - * Generated from protobuf field int64 row_count = 1; - */ - protected $row_count = 0; - /** - * Whether the data quality result was `pass` or not. - * - * Generated from protobuf field bool passed = 2; - */ - protected $passed = false; - /** - * The result of each dimension for data quality result. - * The key of the map is the name of the dimension. - * The value is the bool value depicting whether the dimension result was - * `pass` or not. - * - * Generated from protobuf field map dimension_passed = 3; - */ - private $dimension_passed; - /** - * The table-level data quality score for the data scan job. - * The data quality score ranges between [0, 100] (up to two decimal - * points). - * - * Generated from protobuf field float score = 4; - */ - protected $score = 0.0; - /** - * The score of each dimension for data quality result. - * The key of the map is the name of the dimension. - * The value is the data quality score for the dimension. - * The score ranges between [0, 100] (up to two decimal - * points). - * - * Generated from protobuf field map dimension_score = 5; - */ - private $dimension_score; - /** - * The score of each column scanned in the data scan job. - * The key of the map is the name of the column. - * The value is the data quality score for the column. - * The score ranges between [0, 100] (up to two decimal - * points). - * - * Generated from protobuf field map column_score = 6; - */ - private $column_score; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $row_count - * The count of rows processed in the data scan job. - * @type bool $passed - * Whether the data quality result was `pass` or not. - * @type array|\Google\Protobuf\Internal\MapField $dimension_passed - * The result of each dimension for data quality result. - * The key of the map is the name of the dimension. - * The value is the bool value depicting whether the dimension result was - * `pass` or not. - * @type float $score - * The table-level data quality score for the data scan job. - * The data quality score ranges between [0, 100] (up to two decimal - * points). - * @type array|\Google\Protobuf\Internal\MapField $dimension_score - * The score of each dimension for data quality result. - * The key of the map is the name of the dimension. - * The value is the data quality score for the dimension. - * The score ranges between [0, 100] (up to two decimal - * points). - * @type array|\Google\Protobuf\Internal\MapField $column_score - * The score of each column scanned in the data scan job. - * The key of the map is the name of the column. - * The value is the data quality score for the column. - * The score ranges between [0, 100] (up to two decimal - * points). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Logs::initOnce(); - parent::__construct($data); - } - - /** - * The count of rows processed in the data scan job. - * - * Generated from protobuf field int64 row_count = 1; - * @return int|string - */ - public function getRowCount() - { - return $this->row_count; - } - - /** - * The count of rows processed in the data scan job. - * - * Generated from protobuf field int64 row_count = 1; - * @param int|string $var - * @return $this - */ - public function setRowCount($var) - { - GPBUtil::checkInt64($var); - $this->row_count = $var; - - return $this; - } - - /** - * Whether the data quality result was `pass` or not. - * - * Generated from protobuf field bool passed = 2; - * @return bool - */ - public function getPassed() - { - return $this->passed; - } - - /** - * Whether the data quality result was `pass` or not. - * - * Generated from protobuf field bool passed = 2; - * @param bool $var - * @return $this - */ - public function setPassed($var) - { - GPBUtil::checkBool($var); - $this->passed = $var; - - return $this; - } - - /** - * The result of each dimension for data quality result. - * The key of the map is the name of the dimension. - * The value is the bool value depicting whether the dimension result was - * `pass` or not. - * - * Generated from protobuf field map dimension_passed = 3; - * @return \Google\Protobuf\Internal\MapField - */ - public function getDimensionPassed() - { - return $this->dimension_passed; - } - - /** - * The result of each dimension for data quality result. - * The key of the map is the name of the dimension. - * The value is the bool value depicting whether the dimension result was - * `pass` or not. - * - * Generated from protobuf field map dimension_passed = 3; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setDimensionPassed($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::BOOL); - $this->dimension_passed = $arr; - - return $this; - } - - /** - * The table-level data quality score for the data scan job. - * The data quality score ranges between [0, 100] (up to two decimal - * points). - * - * Generated from protobuf field float score = 4; - * @return float - */ - public function getScore() - { - return $this->score; - } - - /** - * The table-level data quality score for the data scan job. - * The data quality score ranges between [0, 100] (up to two decimal - * points). - * - * Generated from protobuf field float score = 4; - * @param float $var - * @return $this - */ - public function setScore($var) - { - GPBUtil::checkFloat($var); - $this->score = $var; - - return $this; - } - - /** - * The score of each dimension for data quality result. - * The key of the map is the name of the dimension. - * The value is the data quality score for the dimension. - * The score ranges between [0, 100] (up to two decimal - * points). - * - * Generated from protobuf field map dimension_score = 5; - * @return \Google\Protobuf\Internal\MapField - */ - public function getDimensionScore() - { - return $this->dimension_score; - } - - /** - * The score of each dimension for data quality result. - * The key of the map is the name of the dimension. - * The value is the data quality score for the dimension. - * The score ranges between [0, 100] (up to two decimal - * points). - * - * Generated from protobuf field map dimension_score = 5; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setDimensionScore($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::FLOAT); - $this->dimension_score = $arr; - - return $this; - } - - /** - * The score of each column scanned in the data scan job. - * The key of the map is the name of the column. - * The value is the data quality score for the column. - * The score ranges between [0, 100] (up to two decimal - * points). - * - * Generated from protobuf field map column_score = 6; - * @return \Google\Protobuf\Internal\MapField - */ - public function getColumnScore() - { - return $this->column_score; - } - - /** - * The score of each column scanned in the data scan job. - * The key of the map is the name of the column. - * The value is the data quality score for the column. - * The score ranges between [0, 100] (up to two decimal - * points). - * - * Generated from protobuf field map column_score = 6; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setColumnScore($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::FLOAT); - $this->column_score = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DataQualityResult::class, \Google\Cloud\Dataplex\V1\DataScanEvent_DataQualityResult::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/PostScanActionsResult.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/PostScanActionsResult.php deleted file mode 100644 index d842233b4a2b..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/PostScanActionsResult.php +++ /dev/null @@ -1,80 +0,0 @@ -google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult - */ -class PostScanActionsResult extends \Google\Protobuf\Internal\Message -{ - /** - * The result of BigQuery export post scan action. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult bigquery_export_result = 1; - */ - protected $bigquery_export_result = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dataplex\V1\DataScanEvent\PostScanActionsResult\BigQueryExportResult $bigquery_export_result - * The result of BigQuery export post scan action. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Logs::initOnce(); - parent::__construct($data); - } - - /** - * The result of BigQuery export post scan action. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult bigquery_export_result = 1; - * @return \Google\Cloud\Dataplex\V1\DataScanEvent\PostScanActionsResult\BigQueryExportResult|null - */ - public function getBigqueryExportResult() - { - return $this->bigquery_export_result; - } - - public function hasBigqueryExportResult() - { - return isset($this->bigquery_export_result); - } - - public function clearBigqueryExportResult() - { - unset($this->bigquery_export_result); - } - - /** - * The result of BigQuery export post scan action. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult bigquery_export_result = 1; - * @param \Google\Cloud\Dataplex\V1\DataScanEvent\PostScanActionsResult\BigQueryExportResult $var - * @return $this - */ - public function setBigqueryExportResult($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataScanEvent\PostScanActionsResult\BigQueryExportResult::class); - $this->bigquery_export_result = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(PostScanActionsResult::class, \Google\Cloud\Dataplex\V1\DataScanEvent_PostScanActionsResult::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/PostScanActionsResult/BigQueryExportResult.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/PostScanActionsResult/BigQueryExportResult.php deleted file mode 100644 index 9cda8309c5b6..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/PostScanActionsResult/BigQueryExportResult.php +++ /dev/null @@ -1,104 +0,0 @@ -google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult - */ -class BigQueryExportResult extends \Google\Protobuf\Internal\Message -{ - /** - * Execution state for the BigQuery exporting. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult.State state = 1; - */ - protected $state = 0; - /** - * Additional information about the BigQuery exporting. - * - * Generated from protobuf field string message = 2; - */ - protected $message = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $state - * Execution state for the BigQuery exporting. - * @type string $message - * Additional information about the BigQuery exporting. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Logs::initOnce(); - parent::__construct($data); - } - - /** - * Execution state for the BigQuery exporting. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult.State state = 1; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Execution state for the BigQuery exporting. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult.State state = 1; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\DataScanEvent\PostScanActionsResult\BigQueryExportResult\State::class); - $this->state = $var; - - return $this; - } - - /** - * Additional information about the BigQuery exporting. - * - * Generated from protobuf field string message = 2; - * @return string - */ - public function getMessage() - { - return $this->message; - } - - /** - * Additional information about the BigQuery exporting. - * - * Generated from protobuf field string message = 2; - * @param string $var - * @return $this - */ - public function setMessage($var) - { - GPBUtil::checkString($var, True); - $this->message = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(BigQueryExportResult::class, \Google\Cloud\Dataplex\V1\DataScanEvent_PostScanActionsResult_BigQueryExportResult::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/PostScanActionsResult/BigQueryExportResult/State.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/PostScanActionsResult/BigQueryExportResult/State.php deleted file mode 100644 index 31bc945ef3fb..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/PostScanActionsResult/BigQueryExportResult/State.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult.State - */ -class State -{ - /** - * The exporting state is unspecified. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The exporting completed successfully. - * - * Generated from protobuf enum SUCCEEDED = 1; - */ - const SUCCEEDED = 1; - /** - * The exporting is no longer running due to an error. - * - * Generated from protobuf enum FAILED = 2; - */ - const FAILED = 2; - /** - * The exporting is skipped due to no valid scan result to export - * (usually caused by scan failed). - * - * Generated from protobuf enum SKIPPED = 3; - */ - const SKIPPED = 3; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::SUCCEEDED => 'SUCCEEDED', - self::FAILED => 'FAILED', - self::SKIPPED => 'SKIPPED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\Dataplex\V1\DataScanEvent_PostScanActionsResult_BigQueryExportResult_State::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/ScanType.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/ScanType.php deleted file mode 100644 index 5c9e261acb29..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/ScanType.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.dataplex.v1.DataScanEvent.ScanType - */ -class ScanType -{ - /** - * An unspecified data scan type. - * - * Generated from protobuf enum SCAN_TYPE_UNSPECIFIED = 0; - */ - const SCAN_TYPE_UNSPECIFIED = 0; - /** - * Data scan for data profile. - * - * Generated from protobuf enum DATA_PROFILE = 1; - */ - const DATA_PROFILE = 1; - /** - * Data scan for data quality. - * - * Generated from protobuf enum DATA_QUALITY = 2; - */ - const DATA_QUALITY = 2; - - private static $valueToName = [ - self::SCAN_TYPE_UNSPECIFIED => 'SCAN_TYPE_UNSPECIFIED', - self::DATA_PROFILE => 'DATA_PROFILE', - self::DATA_QUALITY => 'DATA_QUALITY', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ScanType::class, \Google\Cloud\Dataplex\V1\DataScanEvent_ScanType::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/Scope.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/Scope.php deleted file mode 100644 index b81bd29422c8..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/Scope.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.dataplex.v1.DataScanEvent.Scope - */ -class Scope -{ - /** - * An unspecified scope type. - * - * Generated from protobuf enum SCOPE_UNSPECIFIED = 0; - */ - const SCOPE_UNSPECIFIED = 0; - /** - * Data scan runs on all of the data. - * - * Generated from protobuf enum FULL = 1; - */ - const FULL = 1; - /** - * Data scan runs on incremental data. - * - * Generated from protobuf enum INCREMENTAL = 2; - */ - const INCREMENTAL = 2; - - private static $valueToName = [ - self::SCOPE_UNSPECIFIED => 'SCOPE_UNSPECIFIED', - self::FULL => 'FULL', - self::INCREMENTAL => 'INCREMENTAL', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Scope::class, \Google\Cloud\Dataplex\V1\DataScanEvent_Scope::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/State.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/State.php deleted file mode 100644 index 29f93fc47dd1..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/State.php +++ /dev/null @@ -1,85 +0,0 @@ -google.cloud.dataplex.v1.DataScanEvent.State - */ -class State -{ - /** - * Unspecified job state. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Data scan job started. - * - * Generated from protobuf enum STARTED = 1; - */ - const STARTED = 1; - /** - * Data scan job successfully completed. - * - * Generated from protobuf enum SUCCEEDED = 2; - */ - const SUCCEEDED = 2; - /** - * Data scan job was unsuccessful. - * - * Generated from protobuf enum FAILED = 3; - */ - const FAILED = 3; - /** - * Data scan job was cancelled. - * - * Generated from protobuf enum CANCELLED = 4; - */ - const CANCELLED = 4; - /** - * Data scan job was createed. - * - * Generated from protobuf enum CREATED = 5; - */ - const CREATED = 5; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::STARTED => 'STARTED', - self::SUCCEEDED => 'SUCCEEDED', - self::FAILED => 'FAILED', - self::CANCELLED => 'CANCELLED', - self::CREATED => 'CREATED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\Dataplex\V1\DataScanEvent_State::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/Trigger.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/Trigger.php deleted file mode 100644 index 5eb2d66898ba..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanEvent/Trigger.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.dataplex.v1.DataScanEvent.Trigger - */ -class Trigger -{ - /** - * An unspecified trigger type. - * - * Generated from protobuf enum TRIGGER_UNSPECIFIED = 0; - */ - const TRIGGER_UNSPECIFIED = 0; - /** - * Data scan triggers on demand. - * - * Generated from protobuf enum ON_DEMAND = 1; - */ - const ON_DEMAND = 1; - /** - * Data scan triggers as per schedule. - * - * Generated from protobuf enum SCHEDULE = 2; - */ - const SCHEDULE = 2; - - private static $valueToName = [ - self::TRIGGER_UNSPECIFIED => 'TRIGGER_UNSPECIFIED', - self::ON_DEMAND => 'ON_DEMAND', - self::SCHEDULE => 'SCHEDULE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Trigger::class, \Google\Cloud\Dataplex\V1\DataScanEvent_Trigger::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanJob.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanJob.php deleted file mode 100644 index c9d59028ed9e..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanJob.php +++ /dev/null @@ -1,453 +0,0 @@ -google.cloud.dataplex.v1.DataScanJob - */ -class DataScanJob extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The relative resource name of the DataScanJob, of the form: - * `projects/{project}/locations/{location_id}/dataScans/{datascan_id}/jobs/{job_id}`, - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. System generated globally unique ID for the DataScanJob. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - /** - * Output only. The time when the DataScanJob was started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $start_time = null; - /** - * Output only. The time when the DataScanJob ended. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $end_time = null; - /** - * Output only. Execution state for the DataScanJob. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScanJob.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. Additional information about the current state. - * - * Generated from protobuf field string message = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $message = ''; - /** - * Output only. The type of the parent DataScan. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScanType type = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $type = 0; - protected $spec; - protected $result; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The relative resource name of the DataScanJob, of the form: - * `projects/{project}/locations/{location_id}/dataScans/{datascan_id}/jobs/{job_id}`, - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * @type string $uid - * Output only. System generated globally unique ID for the DataScanJob. - * @type \Google\Protobuf\Timestamp $start_time - * Output only. The time when the DataScanJob was started. - * @type \Google\Protobuf\Timestamp $end_time - * Output only. The time when the DataScanJob ended. - * @type int $state - * Output only. Execution state for the DataScanJob. - * @type string $message - * Output only. Additional information about the current state. - * @type int $type - * Output only. The type of the parent DataScan. - * @type \Google\Cloud\Dataplex\V1\DataQualitySpec $data_quality_spec - * Output only. DataQualityScan related setting. - * @type \Google\Cloud\Dataplex\V1\DataProfileSpec $data_profile_spec - * Output only. DataProfileScan related setting. - * @type \Google\Cloud\Dataplex\V1\DataQualityResult $data_quality_result - * Output only. The result of the data quality scan. - * @type \Google\Cloud\Dataplex\V1\DataProfileResult $data_profile_result - * Output only. The result of the data profile scan. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Datascans::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The relative resource name of the DataScanJob, of the form: - * `projects/{project}/locations/{location_id}/dataScans/{datascan_id}/jobs/{job_id}`, - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The relative resource name of the DataScanJob, of the form: - * `projects/{project}/locations/{location_id}/dataScans/{datascan_id}/jobs/{job_id}`, - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. System generated globally unique ID for the DataScanJob. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. System generated globally unique ID for the DataScanJob. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - - /** - * Output only. The time when the DataScanJob was started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStartTime() - { - return $this->start_time; - } - - public function hasStartTime() - { - return isset($this->start_time); - } - - public function clearStartTime() - { - unset($this->start_time); - } - - /** - * Output only. The time when the DataScanJob was started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * Output only. The time when the DataScanJob ended. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * Output only. The time when the DataScanJob ended. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * Output only. Execution state for the DataScanJob. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScanJob.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. Execution state for the DataScanJob. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScanJob.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\DataScanJob\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. Additional information about the current state. - * - * Generated from protobuf field string message = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getMessage() - { - return $this->message; - } - - /** - * Output only. Additional information about the current state. - * - * Generated from protobuf field string message = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setMessage($var) - { - GPBUtil::checkString($var, True); - $this->message = $var; - - return $this; - } - - /** - * Output only. The type of the parent DataScan. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScanType type = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Output only. The type of the parent DataScan. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScanType type = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\DataScanType::class); - $this->type = $var; - - return $this; - } - - /** - * Output only. DataQualityScan related setting. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualitySpec data_quality_spec = 100 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Dataplex\V1\DataQualitySpec|null - */ - public function getDataQualitySpec() - { - return $this->readOneof(100); - } - - public function hasDataQualitySpec() - { - return $this->hasOneof(100); - } - - /** - * Output only. DataQualityScan related setting. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualitySpec data_quality_spec = 100 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Dataplex\V1\DataQualitySpec $var - * @return $this - */ - public function setDataQualitySpec($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataQualitySpec::class); - $this->writeOneof(100, $var); - - return $this; - } - - /** - * Output only. DataProfileScan related setting. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileSpec data_profile_spec = 101 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Dataplex\V1\DataProfileSpec|null - */ - public function getDataProfileSpec() - { - return $this->readOneof(101); - } - - public function hasDataProfileSpec() - { - return $this->hasOneof(101); - } - - /** - * Output only. DataProfileScan related setting. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileSpec data_profile_spec = 101 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Dataplex\V1\DataProfileSpec $var - * @return $this - */ - public function setDataProfileSpec($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataProfileSpec::class); - $this->writeOneof(101, $var); - - return $this; - } - - /** - * Output only. The result of the data quality scan. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityResult data_quality_result = 200 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Dataplex\V1\DataQualityResult|null - */ - public function getDataQualityResult() - { - return $this->readOneof(200); - } - - public function hasDataQualityResult() - { - return $this->hasOneof(200); - } - - /** - * Output only. The result of the data quality scan. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityResult data_quality_result = 200 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Dataplex\V1\DataQualityResult $var - * @return $this - */ - public function setDataQualityResult($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataQualityResult::class); - $this->writeOneof(200, $var); - - return $this; - } - - /** - * Output only. The result of the data profile scan. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileResult data_profile_result = 201 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Dataplex\V1\DataProfileResult|null - */ - public function getDataProfileResult() - { - return $this->readOneof(201); - } - - public function hasDataProfileResult() - { - return $this->hasOneof(201); - } - - /** - * Output only. The result of the data profile scan. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataProfileResult data_profile_result = 201 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Dataplex\V1\DataProfileResult $var - * @return $this - */ - public function setDataProfileResult($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataProfileResult::class); - $this->writeOneof(201, $var); - - return $this; - } - - /** - * @return string - */ - public function getSpec() - { - return $this->whichOneof("spec"); - } - - /** - * @return string - */ - public function getResult() - { - return $this->whichOneof("result"); - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanJob/State.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanJob/State.php deleted file mode 100644 index 2f9f1f2be1a4..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanJob/State.php +++ /dev/null @@ -1,92 +0,0 @@ -google.cloud.dataplex.v1.DataScanJob.State - */ -class State -{ - /** - * The DataScanJob state is unspecified. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The DataScanJob is running. - * - * Generated from protobuf enum RUNNING = 1; - */ - const RUNNING = 1; - /** - * The DataScanJob is canceling. - * - * Generated from protobuf enum CANCELING = 2; - */ - const CANCELING = 2; - /** - * The DataScanJob cancellation was successful. - * - * Generated from protobuf enum CANCELLED = 3; - */ - const CANCELLED = 3; - /** - * The DataScanJob completed successfully. - * - * Generated from protobuf enum SUCCEEDED = 4; - */ - const SUCCEEDED = 4; - /** - * The DataScanJob is no longer running due to an error. - * - * Generated from protobuf enum FAILED = 5; - */ - const FAILED = 5; - /** - * The DataScanJob has been created but not started to run yet. - * - * Generated from protobuf enum PENDING = 7; - */ - const PENDING = 7; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::RUNNING => 'RUNNING', - self::CANCELING => 'CANCELING', - self::CANCELLED => 'CANCELLED', - self::SUCCEEDED => 'SUCCEEDED', - self::FAILED => 'FAILED', - self::PENDING => 'PENDING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\Dataplex\V1\DataScanJob_State::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanType.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanType.php deleted file mode 100644 index 66a3a372f908..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataScanType.php +++ /dev/null @@ -1,61 +0,0 @@ -google.cloud.dataplex.v1.DataScanType - */ -class DataScanType -{ - /** - * The DataScan type is unspecified. - * - * Generated from protobuf enum DATA_SCAN_TYPE_UNSPECIFIED = 0; - */ - const DATA_SCAN_TYPE_UNSPECIFIED = 0; - /** - * Data Quality scan. - * - * Generated from protobuf enum DATA_QUALITY = 1; - */ - const DATA_QUALITY = 1; - /** - * Data Profile scan. - * - * Generated from protobuf enum DATA_PROFILE = 2; - */ - const DATA_PROFILE = 2; - - private static $valueToName = [ - self::DATA_SCAN_TYPE_UNSPECIFIED => 'DATA_SCAN_TYPE_UNSPECIFIED', - self::DATA_QUALITY => 'DATA_QUALITY', - self::DATA_PROFILE => 'DATA_PROFILE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataSource.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataSource.php deleted file mode 100644 index 4ed62915b28d..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataSource.php +++ /dev/null @@ -1,123 +0,0 @@ -google.cloud.dataplex.v1.DataSource - */ -class DataSource extends \Google\Protobuf\Internal\Message -{ - protected $source; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $entity - * Immutable. The Dataplex entity that represents the data source (e.g. - * BigQuery table) for DataScan, of the form: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. - * @type string $resource - * Immutable. The service-qualified full resource name of the cloud resource - * for a DataScan job to scan against. The field could be: BigQuery table of - * type "TABLE" for DataProfileScan/DataQualityScan Format: - * //bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Processing::initOnce(); - parent::__construct($data); - } - - /** - * Immutable. The Dataplex entity that represents the data source (e.g. - * BigQuery table) for DataScan, of the form: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. - * - * Generated from protobuf field string entity = 100 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { - * @return string - */ - public function getEntity() - { - return $this->readOneof(100); - } - - public function hasEntity() - { - return $this->hasOneof(100); - } - - /** - * Immutable. The Dataplex entity that represents the data source (e.g. - * BigQuery table) for DataScan, of the form: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. - * - * Generated from protobuf field string entity = 100 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setEntity($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(100, $var); - - return $this; - } - - /** - * Immutable. The service-qualified full resource name of the cloud resource - * for a DataScan job to scan against. The field could be: BigQuery table of - * type "TABLE" for DataProfileScan/DataQualityScan Format: - * //bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID - * - * Generated from protobuf field string resource = 101 [(.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getResource() - { - return $this->readOneof(101); - } - - public function hasResource() - { - return $this->hasOneof(101); - } - - /** - * Immutable. The service-qualified full resource name of the cloud resource - * for a DataScan job to scan against. The field could be: BigQuery table of - * type "TABLE" for DataProfileScan/DataQualityScan Format: - * //bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID - * - * Generated from protobuf field string resource = 101 [(.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setResource($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(101, $var); - - return $this; - } - - /** - * @return string - */ - public function getSource() - { - return $this->whichOneof("source"); - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataTaxonomy.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataTaxonomy.php deleted file mode 100644 index 5fb5f3a7c589..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DataTaxonomy.php +++ /dev/null @@ -1,415 +0,0 @@ -google.cloud.dataplex.v1.DataTaxonomy - */ -class DataTaxonomy extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The relative resource name of the DataTaxonomy, of the form: - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Output only. System generated globally unique ID for the dataTaxonomy. This - * ID will be different if the DataTaxonomy is deleted and re-created with the - * same name. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - /** - * Output only. The time when the DataTaxonomy was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time when the DataTaxonomy was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Optional. Description of the DataTaxonomy. - * - * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Optional. User friendly display name. - * - * Generated from protobuf field string display_name = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $display_name = ''; - /** - * Optional. User-defined labels for the DataTaxonomy. - * - * Generated from protobuf field map labels = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * Output only. The number of attributes in the DataTaxonomy. - * - * Generated from protobuf field int32 attribute_count = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $attribute_count = 0; - /** - * This checksum is computed by the server based on the value of other - * fields, and may be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * - * Generated from protobuf field string etag = 10; - */ - protected $etag = ''; - /** - * Output only. The number of classes in the DataTaxonomy. - * - * Generated from protobuf field int32 class_count = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $class_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The relative resource name of the DataTaxonomy, of the form: - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}. - * @type string $uid - * Output only. System generated globally unique ID for the dataTaxonomy. This - * ID will be different if the DataTaxonomy is deleted and re-created with the - * same name. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time when the DataTaxonomy was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time when the DataTaxonomy was last updated. - * @type string $description - * Optional. Description of the DataTaxonomy. - * @type string $display_name - * Optional. User friendly display name. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. User-defined labels for the DataTaxonomy. - * @type int $attribute_count - * Output only. The number of attributes in the DataTaxonomy. - * @type string $etag - * This checksum is computed by the server based on the value of other - * fields, and may be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * @type int $class_count - * Output only. The number of classes in the DataTaxonomy. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataTaxonomy::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The relative resource name of the DataTaxonomy, of the form: - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The relative resource name of the DataTaxonomy, of the form: - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. System generated globally unique ID for the dataTaxonomy. This - * ID will be different if the DataTaxonomy is deleted and re-created with the - * same name. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. System generated globally unique ID for the dataTaxonomy. This - * ID will be different if the DataTaxonomy is deleted and re-created with the - * same name. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - - /** - * Output only. The time when the DataTaxonomy was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time when the DataTaxonomy was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The time when the DataTaxonomy was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The time when the DataTaxonomy was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Optional. Description of the DataTaxonomy. - * - * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. Description of the DataTaxonomy. - * - * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Optional. User friendly display name. - * - * Generated from protobuf field string display_name = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Optional. User friendly display name. - * - * Generated from protobuf field string display_name = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Optional. User-defined labels for the DataTaxonomy. - * - * Generated from protobuf field map labels = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. User-defined labels for the DataTaxonomy. - * - * Generated from protobuf field map labels = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Output only. The number of attributes in the DataTaxonomy. - * - * Generated from protobuf field int32 attribute_count = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getAttributeCount() - { - return $this->attribute_count; - } - - /** - * Output only. The number of attributes in the DataTaxonomy. - * - * Generated from protobuf field int32 attribute_count = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setAttributeCount($var) - { - GPBUtil::checkInt32($var); - $this->attribute_count = $var; - - return $this; - } - - /** - * This checksum is computed by the server based on the value of other - * fields, and may be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * - * Generated from protobuf field string etag = 10; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * This checksum is computed by the server based on the value of other - * fields, and may be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * - * Generated from protobuf field string etag = 10; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - - /** - * Output only. The number of classes in the DataTaxonomy. - * - * Generated from protobuf field int32 class_count = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getClassCount() - { - return $this->class_count; - } - - /** - * Output only. The number of classes in the DataTaxonomy. - * - * Generated from protobuf field int32 class_count = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setClassCount($var) - { - GPBUtil::checkInt32($var); - $this->class_count = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteAspectTypeRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteAspectTypeRequest.php deleted file mode 100644 index c4a2135e2ac5..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteAspectTypeRequest.php +++ /dev/null @@ -1,124 +0,0 @@ -google.cloud.dataplex.v1.DeleteAspectTypeRequest - */ -class DeleteAspectTypeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the AspectType: - * `projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. If the client provided etag value does not match the current etag - * value, the DeleteAspectTypeRequest method returns an ABORTED error response - * - * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $etag = ''; - - /** - * @param string $name Required. The resource name of the AspectType: - * `projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}`. Please see - * {@see CatalogServiceClient::aspectTypeName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\DeleteAspectTypeRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the AspectType: - * `projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}`. - * @type string $etag - * Optional. If the client provided etag value does not match the current etag - * value, the DeleteAspectTypeRequest method returns an ABORTED error response - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Catalog::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the AspectType: - * `projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the AspectType: - * `projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. If the client provided etag value does not match the current etag - * value, the DeleteAspectTypeRequest method returns an ABORTED error response - * - * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * Optional. If the client provided etag value does not match the current etag - * value, the DeleteAspectTypeRequest method returns an ABORTED error response - * - * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteAssetRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteAssetRequest.php deleted file mode 100644 index 52cbcfe8c9d8..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteAssetRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.dataplex.v1.DeleteAssetRequest - */ -class DeleteAssetRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the asset: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The resource name of the asset: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. Please see - * {@see DataplexServiceClient::assetName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\DeleteAssetRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the asset: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the asset: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the asset: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteContentRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteContentRequest.php deleted file mode 100644 index 132887e9d3a5..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteContentRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.dataplex.v1.DeleteContentRequest - */ -class DeleteContentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the content: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The resource name of the content: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id} - * Please see {@see ContentServiceClient::contentName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\DeleteContentRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the content: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id} - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Content::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the content: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the content: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteDataAttributeBindingRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteDataAttributeBindingRequest.php deleted file mode 100644 index 4efe4d2724c9..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteDataAttributeBindingRequest.php +++ /dev/null @@ -1,132 +0,0 @@ -google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest - */ -class DeleteDataAttributeBindingRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the DataAttributeBinding: - * projects/{project_number}/locations/{location_id}/dataAttributeBindings/{data_attribute_binding_id} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. If the client provided etag value does not match the current etag - * value, the DeleteDataAttributeBindingRequest method returns an ABORTED - * error response. Etags must be used when calling the - * DeleteDataAttributeBinding. - * - * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $etag = ''; - - /** - * @param string $name Required. The resource name of the DataAttributeBinding: - * projects/{project_number}/locations/{location_id}/dataAttributeBindings/{data_attribute_binding_id} - * Please see {@see DataTaxonomyServiceClient::dataAttributeBindingName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\DeleteDataAttributeBindingRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the DataAttributeBinding: - * projects/{project_number}/locations/{location_id}/dataAttributeBindings/{data_attribute_binding_id} - * @type string $etag - * Required. If the client provided etag value does not match the current etag - * value, the DeleteDataAttributeBindingRequest method returns an ABORTED - * error response. Etags must be used when calling the - * DeleteDataAttributeBinding. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataTaxonomy::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the DataAttributeBinding: - * projects/{project_number}/locations/{location_id}/dataAttributeBindings/{data_attribute_binding_id} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the DataAttributeBinding: - * projects/{project_number}/locations/{location_id}/dataAttributeBindings/{data_attribute_binding_id} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. If the client provided etag value does not match the current etag - * value, the DeleteDataAttributeBindingRequest method returns an ABORTED - * error response. Etags must be used when calling the - * DeleteDataAttributeBinding. - * - * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * Required. If the client provided etag value does not match the current etag - * value, the DeleteDataAttributeBindingRequest method returns an ABORTED - * error response. Etags must be used when calling the - * DeleteDataAttributeBinding. - * - * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteDataAttributeRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteDataAttributeRequest.php deleted file mode 100644 index 819df2652cfd..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteDataAttributeRequest.php +++ /dev/null @@ -1,124 +0,0 @@ -google.cloud.dataplex.v1.DeleteDataAttributeRequest - */ -class DeleteDataAttributeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the DataAttribute: - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. If the client provided etag value does not match the current etag - * value, the DeleteDataAttribute method returns an ABORTED error response. - * - * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $etag = ''; - - /** - * @param string $name Required. The resource name of the DataAttribute: - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id} - * Please see {@see DataTaxonomyServiceClient::dataAttributeName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\DeleteDataAttributeRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the DataAttribute: - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id} - * @type string $etag - * Optional. If the client provided etag value does not match the current etag - * value, the DeleteDataAttribute method returns an ABORTED error response. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataTaxonomy::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the DataAttribute: - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the DataAttribute: - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. If the client provided etag value does not match the current etag - * value, the DeleteDataAttribute method returns an ABORTED error response. - * - * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * Optional. If the client provided etag value does not match the current etag - * value, the DeleteDataAttribute method returns an ABORTED error response. - * - * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteDataScanRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteDataScanRequest.php deleted file mode 100644 index 613ef402d4ea..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteDataScanRequest.php +++ /dev/null @@ -1,96 +0,0 @@ -google.cloud.dataplex.v1.DeleteDataScanRequest - */ -class DeleteDataScanRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the dataScan: - * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The resource name of the dataScan: - * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. Please see - * {@see DataScanServiceClient::dataScanName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\DeleteDataScanRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the dataScan: - * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Datascans::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the dataScan: - * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the dataScan: - * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteDataTaxonomyRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteDataTaxonomyRequest.php deleted file mode 100644 index a06802b72d28..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteDataTaxonomyRequest.php +++ /dev/null @@ -1,124 +0,0 @@ -google.cloud.dataplex.v1.DeleteDataTaxonomyRequest - */ -class DeleteDataTaxonomyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the DataTaxonomy: - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. If the client provided etag value does not match the current etag - * value,the DeleteDataTaxonomy method returns an ABORTED error. - * - * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $etag = ''; - - /** - * @param string $name Required. The resource name of the DataTaxonomy: - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} - * Please see {@see DataTaxonomyServiceClient::dataTaxonomyName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\DeleteDataTaxonomyRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the DataTaxonomy: - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} - * @type string $etag - * Optional. If the client provided etag value does not match the current etag - * value,the DeleteDataTaxonomy method returns an ABORTED error. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataTaxonomy::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the DataTaxonomy: - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the DataTaxonomy: - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. If the client provided etag value does not match the current etag - * value,the DeleteDataTaxonomy method returns an ABORTED error. - * - * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * Optional. If the client provided etag value does not match the current etag - * value,the DeleteDataTaxonomy method returns an ABORTED error. - * - * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteEntityRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteEntityRequest.php deleted file mode 100644 index 60803562a44c..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteEntityRequest.php +++ /dev/null @@ -1,124 +0,0 @@ -google.cloud.dataplex.v1.DeleteEntityRequest - */ -class DeleteEntityRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the entity: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. The etag associated with the entity, which can be retrieved with - * a [GetEntity][] request. - * - * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $etag = ''; - - /** - * @param string $name Required. The resource name of the entity: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. Please see - * {@see MetadataServiceClient::entityName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\DeleteEntityRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the entity: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. - * @type string $etag - * Required. The etag associated with the entity, which can be retrieved with - * a [GetEntity][] request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Metadata::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the entity: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the entity: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. The etag associated with the entity, which can be retrieved with - * a [GetEntity][] request. - * - * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * Required. The etag associated with the entity, which can be retrieved with - * a [GetEntity][] request. - * - * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteEntryGroupRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteEntryGroupRequest.php deleted file mode 100644 index 00b6cc153273..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteEntryGroupRequest.php +++ /dev/null @@ -1,124 +0,0 @@ -google.cloud.dataplex.v1.DeleteEntryGroupRequest - */ -class DeleteEntryGroupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the EntryGroup: - * `projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. If the client provided etag value does not match the current etag - * value, the DeleteEntryGroupRequest method returns an ABORTED error response - * - * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $etag = ''; - - /** - * @param string $name Required. The resource name of the EntryGroup: - * `projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}`. Please see - * {@see CatalogServiceClient::entryGroupName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\DeleteEntryGroupRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the EntryGroup: - * `projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}`. - * @type string $etag - * Optional. If the client provided etag value does not match the current etag - * value, the DeleteEntryGroupRequest method returns an ABORTED error response - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Catalog::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the EntryGroup: - * `projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the EntryGroup: - * `projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. If the client provided etag value does not match the current etag - * value, the DeleteEntryGroupRequest method returns an ABORTED error response - * - * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * Optional. If the client provided etag value does not match the current etag - * value, the DeleteEntryGroupRequest method returns an ABORTED error response - * - * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteEntryRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteEntryRequest.php deleted file mode 100644 index 5ad5bed0d9f4..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteEntryRequest.php +++ /dev/null @@ -1,84 +0,0 @@ -google.cloud.dataplex.v1.DeleteEntryRequest - */ -class DeleteEntryRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the Entry: - * `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The resource name of the Entry: - * `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. Please see - * {@see CatalogServiceClient::entryName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\DeleteEntryRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the Entry: - * `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Catalog::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the Entry: - * `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the Entry: - * `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteEntryTypeRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteEntryTypeRequest.php deleted file mode 100644 index 5e44ac6568ba..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteEntryTypeRequest.php +++ /dev/null @@ -1,124 +0,0 @@ -google.cloud.dataplex.v1.DeleteEntryTypeRequest - */ -class DeleteEntryTypeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the EntryType: - * `projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. If the client provided etag value does not match the current etag - * value, the DeleteEntryTypeRequest method returns an ABORTED error response - * - * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $etag = ''; - - /** - * @param string $name Required. The resource name of the EntryType: - * `projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}`. Please see - * {@see CatalogServiceClient::entryTypeName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\DeleteEntryTypeRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the EntryType: - * `projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}`. - * @type string $etag - * Optional. If the client provided etag value does not match the current etag - * value, the DeleteEntryTypeRequest method returns an ABORTED error response - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Catalog::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the EntryType: - * `projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the EntryType: - * `projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. If the client provided etag value does not match the current etag - * value, the DeleteEntryTypeRequest method returns an ABORTED error response - * - * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * Optional. If the client provided etag value does not match the current etag - * value, the DeleteEntryTypeRequest method returns an ABORTED error response - * - * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteEnvironmentRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteEnvironmentRequest.php deleted file mode 100644 index 39a9ffc44d4a..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteEnvironmentRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.dataplex.v1.DeleteEnvironmentRequest - */ -class DeleteEnvironmentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the environment: - * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The resource name of the environment: - * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`. Please see - * {@see DataplexServiceClient::environmentName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\DeleteEnvironmentRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the environment: - * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the environment: - * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the environment: - * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteLakeRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteLakeRequest.php deleted file mode 100644 index 7290cc2f7e49..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteLakeRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.dataplex.v1.DeleteLakeRequest - */ -class DeleteLakeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The resource name of the lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. Please see - * {@see DataplexServiceClient::lakeName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\DeleteLakeRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeletePartitionRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeletePartitionRequest.php deleted file mode 100644 index 4b9c452fa696..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeletePartitionRequest.php +++ /dev/null @@ -1,140 +0,0 @@ -google.cloud.dataplex.v1.DeletePartitionRequest - */ -class DeletePartitionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the partition. - * format: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_value_path}`. - * The {partition_value_path} segment consists of an ordered sequence of - * partition values separated by "/". All values must be provided. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. The etag associated with the partition. - * - * Generated from protobuf field string etag = 2 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * @deprecated - */ - protected $etag = ''; - - /** - * @param string $name Required. The resource name of the partition. - * format: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_value_path}`. - * The {partition_value_path} segment consists of an ordered sequence of - * partition values separated by "/". All values must be provided. Please see - * {@see MetadataServiceClient::partitionName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\DeletePartitionRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the partition. - * format: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_value_path}`. - * The {partition_value_path} segment consists of an ordered sequence of - * partition values separated by "/". All values must be provided. - * @type string $etag - * Optional. The etag associated with the partition. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Metadata::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the partition. - * format: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_value_path}`. - * The {partition_value_path} segment consists of an ordered sequence of - * partition values separated by "/". All values must be provided. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the partition. - * format: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_value_path}`. - * The {partition_value_path} segment consists of an ordered sequence of - * partition values separated by "/". All values must be provided. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. The etag associated with the partition. - * - * Generated from protobuf field string etag = 2 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * @return string - * @deprecated - */ - public function getEtag() - { - @trigger_error('etag is deprecated.', E_USER_DEPRECATED); - return $this->etag; - } - - /** - * Optional. The etag associated with the partition. - * - * Generated from protobuf field string etag = 2 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - * @deprecated - */ - public function setEtag($var) - { - @trigger_error('etag is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteTaskRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteTaskRequest.php deleted file mode 100644 index 29666656ccad..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteTaskRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.dataplex.v1.DeleteTaskRequest - */ -class DeleteTaskRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the task: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The resource name of the task: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}`. Please see - * {@see DataplexServiceClient::taskName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\DeleteTaskRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the task: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the task: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the task: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteZoneRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteZoneRequest.php deleted file mode 100644 index d22235aebd9b..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DeleteZoneRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.dataplex.v1.DeleteZoneRequest - */ -class DeleteZoneRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The resource name of the zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. Please see - * {@see DataplexServiceClient::zoneName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\DeleteZoneRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DiscoveryEvent.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DiscoveryEvent.php deleted file mode 100644 index c72a91aa4b02..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DiscoveryEvent.php +++ /dev/null @@ -1,378 +0,0 @@ -google.cloud.dataplex.v1.DiscoveryEvent - */ -class DiscoveryEvent extends \Google\Protobuf\Internal\Message -{ - /** - * The log message. - * - * Generated from protobuf field string message = 1; - */ - protected $message = ''; - /** - * The id of the associated lake. - * - * Generated from protobuf field string lake_id = 2; - */ - protected $lake_id = ''; - /** - * The id of the associated zone. - * - * Generated from protobuf field string zone_id = 3; - */ - protected $zone_id = ''; - /** - * The id of the associated asset. - * - * Generated from protobuf field string asset_id = 4; - */ - protected $asset_id = ''; - /** - * The data location associated with the event. - * - * Generated from protobuf field string data_location = 5; - */ - protected $data_location = ''; - /** - * The type of the event being logged. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DiscoveryEvent.EventType type = 10; - */ - protected $type = 0; - protected $details; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $message - * The log message. - * @type string $lake_id - * The id of the associated lake. - * @type string $zone_id - * The id of the associated zone. - * @type string $asset_id - * The id of the associated asset. - * @type string $data_location - * The data location associated with the event. - * @type int $type - * The type of the event being logged. - * @type \Google\Cloud\Dataplex\V1\DiscoveryEvent\ConfigDetails $config - * Details about discovery configuration in effect. - * @type \Google\Cloud\Dataplex\V1\DiscoveryEvent\EntityDetails $entity - * Details about the entity associated with the event. - * @type \Google\Cloud\Dataplex\V1\DiscoveryEvent\PartitionDetails $partition - * Details about the partition associated with the event. - * @type \Google\Cloud\Dataplex\V1\DiscoveryEvent\ActionDetails $action - * Details about the action associated with the event. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Logs::initOnce(); - parent::__construct($data); - } - - /** - * The log message. - * - * Generated from protobuf field string message = 1; - * @return string - */ - public function getMessage() - { - return $this->message; - } - - /** - * The log message. - * - * Generated from protobuf field string message = 1; - * @param string $var - * @return $this - */ - public function setMessage($var) - { - GPBUtil::checkString($var, True); - $this->message = $var; - - return $this; - } - - /** - * The id of the associated lake. - * - * Generated from protobuf field string lake_id = 2; - * @return string - */ - public function getLakeId() - { - return $this->lake_id; - } - - /** - * The id of the associated lake. - * - * Generated from protobuf field string lake_id = 2; - * @param string $var - * @return $this - */ - public function setLakeId($var) - { - GPBUtil::checkString($var, True); - $this->lake_id = $var; - - return $this; - } - - /** - * The id of the associated zone. - * - * Generated from protobuf field string zone_id = 3; - * @return string - */ - public function getZoneId() - { - return $this->zone_id; - } - - /** - * The id of the associated zone. - * - * Generated from protobuf field string zone_id = 3; - * @param string $var - * @return $this - */ - public function setZoneId($var) - { - GPBUtil::checkString($var, True); - $this->zone_id = $var; - - return $this; - } - - /** - * The id of the associated asset. - * - * Generated from protobuf field string asset_id = 4; - * @return string - */ - public function getAssetId() - { - return $this->asset_id; - } - - /** - * The id of the associated asset. - * - * Generated from protobuf field string asset_id = 4; - * @param string $var - * @return $this - */ - public function setAssetId($var) - { - GPBUtil::checkString($var, True); - $this->asset_id = $var; - - return $this; - } - - /** - * The data location associated with the event. - * - * Generated from protobuf field string data_location = 5; - * @return string - */ - public function getDataLocation() - { - return $this->data_location; - } - - /** - * The data location associated with the event. - * - * Generated from protobuf field string data_location = 5; - * @param string $var - * @return $this - */ - public function setDataLocation($var) - { - GPBUtil::checkString($var, True); - $this->data_location = $var; - - return $this; - } - - /** - * The type of the event being logged. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DiscoveryEvent.EventType type = 10; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * The type of the event being logged. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DiscoveryEvent.EventType type = 10; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\DiscoveryEvent\EventType::class); - $this->type = $var; - - return $this; - } - - /** - * Details about discovery configuration in effect. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails config = 20; - * @return \Google\Cloud\Dataplex\V1\DiscoveryEvent\ConfigDetails|null - */ - public function getConfig() - { - return $this->readOneof(20); - } - - public function hasConfig() - { - return $this->hasOneof(20); - } - - /** - * Details about discovery configuration in effect. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails config = 20; - * @param \Google\Cloud\Dataplex\V1\DiscoveryEvent\ConfigDetails $var - * @return $this - */ - public function setConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DiscoveryEvent\ConfigDetails::class); - $this->writeOneof(20, $var); - - return $this; - } - - /** - * Details about the entity associated with the event. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails entity = 21; - * @return \Google\Cloud\Dataplex\V1\DiscoveryEvent\EntityDetails|null - */ - public function getEntity() - { - return $this->readOneof(21); - } - - public function hasEntity() - { - return $this->hasOneof(21); - } - - /** - * Details about the entity associated with the event. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails entity = 21; - * @param \Google\Cloud\Dataplex\V1\DiscoveryEvent\EntityDetails $var - * @return $this - */ - public function setEntity($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DiscoveryEvent\EntityDetails::class); - $this->writeOneof(21, $var); - - return $this; - } - - /** - * Details about the partition associated with the event. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails partition = 22; - * @return \Google\Cloud\Dataplex\V1\DiscoveryEvent\PartitionDetails|null - */ - public function getPartition() - { - return $this->readOneof(22); - } - - public function hasPartition() - { - return $this->hasOneof(22); - } - - /** - * Details about the partition associated with the event. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails partition = 22; - * @param \Google\Cloud\Dataplex\V1\DiscoveryEvent\PartitionDetails $var - * @return $this - */ - public function setPartition($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DiscoveryEvent\PartitionDetails::class); - $this->writeOneof(22, $var); - - return $this; - } - - /** - * Details about the action associated with the event. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails action = 23; - * @return \Google\Cloud\Dataplex\V1\DiscoveryEvent\ActionDetails|null - */ - public function getAction() - { - return $this->readOneof(23); - } - - public function hasAction() - { - return $this->hasOneof(23); - } - - /** - * Details about the action associated with the event. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails action = 23; - * @param \Google\Cloud\Dataplex\V1\DiscoveryEvent\ActionDetails $var - * @return $this - */ - public function setAction($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DiscoveryEvent\ActionDetails::class); - $this->writeOneof(23, $var); - - return $this; - } - - /** - * @return string - */ - public function getDetails() - { - return $this->whichOneof("details"); - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DiscoveryEvent/ActionDetails.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DiscoveryEvent/ActionDetails.php deleted file mode 100644 index a0159af03d0f..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DiscoveryEvent/ActionDetails.php +++ /dev/null @@ -1,74 +0,0 @@ -google.cloud.dataplex.v1.DiscoveryEvent.ActionDetails - */ -class ActionDetails extends \Google\Protobuf\Internal\Message -{ - /** - * The type of action. - * Eg. IncompatibleDataSchema, InvalidDataFormat - * - * Generated from protobuf field string type = 1; - */ - protected $type = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $type - * The type of action. - * Eg. IncompatibleDataSchema, InvalidDataFormat - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Logs::initOnce(); - parent::__construct($data); - } - - /** - * The type of action. - * Eg. IncompatibleDataSchema, InvalidDataFormat - * - * Generated from protobuf field string type = 1; - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * The type of action. - * Eg. IncompatibleDataSchema, InvalidDataFormat - * - * Generated from protobuf field string type = 1; - * @param string $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkString($var, True); - $this->type = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ActionDetails::class, \Google\Cloud\Dataplex\V1\DiscoveryEvent_ActionDetails::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DiscoveryEvent/ConfigDetails.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DiscoveryEvent/ConfigDetails.php deleted file mode 100644 index 50371340de3b..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DiscoveryEvent/ConfigDetails.php +++ /dev/null @@ -1,82 +0,0 @@ -google.cloud.dataplex.v1.DiscoveryEvent.ConfigDetails - */ -class ConfigDetails extends \Google\Protobuf\Internal\Message -{ - /** - * A list of discovery configuration parameters in effect. - * The keys are the field paths within DiscoverySpec. - * Eg. includePatterns, excludePatterns, csvOptions.disableTypeInference, - * etc. - * - * Generated from protobuf field map parameters = 1; - */ - private $parameters; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\MapField $parameters - * A list of discovery configuration parameters in effect. - * The keys are the field paths within DiscoverySpec. - * Eg. includePatterns, excludePatterns, csvOptions.disableTypeInference, - * etc. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Logs::initOnce(); - parent::__construct($data); - } - - /** - * A list of discovery configuration parameters in effect. - * The keys are the field paths within DiscoverySpec. - * Eg. includePatterns, excludePatterns, csvOptions.disableTypeInference, - * etc. - * - * Generated from protobuf field map parameters = 1; - * @return \Google\Protobuf\Internal\MapField - */ - public function getParameters() - { - return $this->parameters; - } - - /** - * A list of discovery configuration parameters in effect. - * The keys are the field paths within DiscoverySpec. - * Eg. includePatterns, excludePatterns, csvOptions.disableTypeInference, - * etc. - * - * Generated from protobuf field map parameters = 1; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setParameters($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->parameters = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ConfigDetails::class, \Google\Cloud\Dataplex\V1\DiscoveryEvent_ConfigDetails::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DiscoveryEvent/EntityDetails.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DiscoveryEvent/EntityDetails.php deleted file mode 100644 index 9ed95e8a58e9..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DiscoveryEvent/EntityDetails.php +++ /dev/null @@ -1,108 +0,0 @@ -google.cloud.dataplex.v1.DiscoveryEvent.EntityDetails - */ -class EntityDetails extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the entity resource. - * The name is the fully-qualified resource name. - * - * Generated from protobuf field string entity = 1; - */ - protected $entity = ''; - /** - * The type of the entity resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DiscoveryEvent.EntityType type = 2; - */ - protected $type = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $entity - * The name of the entity resource. - * The name is the fully-qualified resource name. - * @type int $type - * The type of the entity resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Logs::initOnce(); - parent::__construct($data); - } - - /** - * The name of the entity resource. - * The name is the fully-qualified resource name. - * - * Generated from protobuf field string entity = 1; - * @return string - */ - public function getEntity() - { - return $this->entity; - } - - /** - * The name of the entity resource. - * The name is the fully-qualified resource name. - * - * Generated from protobuf field string entity = 1; - * @param string $var - * @return $this - */ - public function setEntity($var) - { - GPBUtil::checkString($var, True); - $this->entity = $var; - - return $this; - } - - /** - * The type of the entity resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DiscoveryEvent.EntityType type = 2; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * The type of the entity resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DiscoveryEvent.EntityType type = 2; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\DiscoveryEvent\EntityType::class); - $this->type = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(EntityDetails::class, \Google\Cloud\Dataplex\V1\DiscoveryEvent_EntityDetails::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DiscoveryEvent/EntityType.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DiscoveryEvent/EntityType.php deleted file mode 100644 index 6bb43ff6c38d..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DiscoveryEvent/EntityType.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.dataplex.v1.DiscoveryEvent.EntityType - */ -class EntityType -{ - /** - * An unspecified event type. - * - * Generated from protobuf enum ENTITY_TYPE_UNSPECIFIED = 0; - */ - const ENTITY_TYPE_UNSPECIFIED = 0; - /** - * Entities representing structured data. - * - * Generated from protobuf enum TABLE = 1; - */ - const TABLE = 1; - /** - * Entities representing unstructured data. - * - * Generated from protobuf enum FILESET = 2; - */ - const FILESET = 2; - - private static $valueToName = [ - self::ENTITY_TYPE_UNSPECIFIED => 'ENTITY_TYPE_UNSPECIFIED', - self::TABLE => 'TABLE', - self::FILESET => 'FILESET', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(EntityType::class, \Google\Cloud\Dataplex\V1\DiscoveryEvent_EntityType::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DiscoveryEvent/EventType.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DiscoveryEvent/EventType.php deleted file mode 100644 index 6bcc8a2096e4..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DiscoveryEvent/EventType.php +++ /dev/null @@ -1,99 +0,0 @@ -google.cloud.dataplex.v1.DiscoveryEvent.EventType - */ -class EventType -{ - /** - * An unspecified event type. - * - * Generated from protobuf enum EVENT_TYPE_UNSPECIFIED = 0; - */ - const EVENT_TYPE_UNSPECIFIED = 0; - /** - * An event representing discovery configuration in effect. - * - * Generated from protobuf enum CONFIG = 1; - */ - const CONFIG = 1; - /** - * An event representing a metadata entity being created. - * - * Generated from protobuf enum ENTITY_CREATED = 2; - */ - const ENTITY_CREATED = 2; - /** - * An event representing a metadata entity being updated. - * - * Generated from protobuf enum ENTITY_UPDATED = 3; - */ - const ENTITY_UPDATED = 3; - /** - * An event representing a metadata entity being deleted. - * - * Generated from protobuf enum ENTITY_DELETED = 4; - */ - const ENTITY_DELETED = 4; - /** - * An event representing a partition being created. - * - * Generated from protobuf enum PARTITION_CREATED = 5; - */ - const PARTITION_CREATED = 5; - /** - * An event representing a partition being updated. - * - * Generated from protobuf enum PARTITION_UPDATED = 6; - */ - const PARTITION_UPDATED = 6; - /** - * An event representing a partition being deleted. - * - * Generated from protobuf enum PARTITION_DELETED = 7; - */ - const PARTITION_DELETED = 7; - - private static $valueToName = [ - self::EVENT_TYPE_UNSPECIFIED => 'EVENT_TYPE_UNSPECIFIED', - self::CONFIG => 'CONFIG', - self::ENTITY_CREATED => 'ENTITY_CREATED', - self::ENTITY_UPDATED => 'ENTITY_UPDATED', - self::ENTITY_DELETED => 'ENTITY_DELETED', - self::PARTITION_CREATED => 'PARTITION_CREATED', - self::PARTITION_UPDATED => 'PARTITION_UPDATED', - self::PARTITION_DELETED => 'PARTITION_DELETED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(EventType::class, \Google\Cloud\Dataplex\V1\DiscoveryEvent_EventType::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DiscoveryEvent/PartitionDetails.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DiscoveryEvent/PartitionDetails.php deleted file mode 100644 index 111e8dab6343..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/DiscoveryEvent/PartitionDetails.php +++ /dev/null @@ -1,184 +0,0 @@ -google.cloud.dataplex.v1.DiscoveryEvent.PartitionDetails - */ -class PartitionDetails extends \Google\Protobuf\Internal\Message -{ - /** - * The name to the partition resource. - * The name is the fully-qualified resource name. - * - * Generated from protobuf field string partition = 1; - */ - protected $partition = ''; - /** - * The name to the containing entity resource. - * The name is the fully-qualified resource name. - * - * Generated from protobuf field string entity = 2; - */ - protected $entity = ''; - /** - * The type of the containing entity resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DiscoveryEvent.EntityType type = 3; - */ - protected $type = 0; - /** - * The locations of the data items (e.g., a Cloud Storage objects) sampled - * for metadata inference. - * - * Generated from protobuf field repeated string sampled_data_locations = 4; - */ - private $sampled_data_locations; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $partition - * The name to the partition resource. - * The name is the fully-qualified resource name. - * @type string $entity - * The name to the containing entity resource. - * The name is the fully-qualified resource name. - * @type int $type - * The type of the containing entity resource. - * @type array|\Google\Protobuf\Internal\RepeatedField $sampled_data_locations - * The locations of the data items (e.g., a Cloud Storage objects) sampled - * for metadata inference. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Logs::initOnce(); - parent::__construct($data); - } - - /** - * The name to the partition resource. - * The name is the fully-qualified resource name. - * - * Generated from protobuf field string partition = 1; - * @return string - */ - public function getPartition() - { - return $this->partition; - } - - /** - * The name to the partition resource. - * The name is the fully-qualified resource name. - * - * Generated from protobuf field string partition = 1; - * @param string $var - * @return $this - */ - public function setPartition($var) - { - GPBUtil::checkString($var, True); - $this->partition = $var; - - return $this; - } - - /** - * The name to the containing entity resource. - * The name is the fully-qualified resource name. - * - * Generated from protobuf field string entity = 2; - * @return string - */ - public function getEntity() - { - return $this->entity; - } - - /** - * The name to the containing entity resource. - * The name is the fully-qualified resource name. - * - * Generated from protobuf field string entity = 2; - * @param string $var - * @return $this - */ - public function setEntity($var) - { - GPBUtil::checkString($var, True); - $this->entity = $var; - - return $this; - } - - /** - * The type of the containing entity resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DiscoveryEvent.EntityType type = 3; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * The type of the containing entity resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DiscoveryEvent.EntityType type = 3; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\DiscoveryEvent\EntityType::class); - $this->type = $var; - - return $this; - } - - /** - * The locations of the data items (e.g., a Cloud Storage objects) sampled - * for metadata inference. - * - * Generated from protobuf field repeated string sampled_data_locations = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSampledDataLocations() - { - return $this->sampled_data_locations; - } - - /** - * The locations of the data items (e.g., a Cloud Storage objects) sampled - * for metadata inference. - * - * Generated from protobuf field repeated string sampled_data_locations = 4; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSampledDataLocations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->sampled_data_locations = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(PartitionDetails::class, \Google\Cloud\Dataplex\V1\DiscoveryEvent_PartitionDetails::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Entity.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Entity.php deleted file mode 100644 index 452871e6f7eb..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Entity.php +++ /dev/null @@ -1,785 +0,0 @@ -google.cloud.dataplex.v1.Entity - */ -class Entity extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The resource name of the entity, of the form: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. Display name must be shorter than or equal to 256 characters. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $display_name = ''; - /** - * Optional. User friendly longer description text. Must be shorter than or - * equal to 1024 characters. - * - * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Output only. The time when the entity was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time when the entity was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Required. A user-provided entity ID. It is mutable, and will be used as the - * published table name. Specifying a new ID in an update entity - * request will override the existing value. - * The ID must contain only letters (a-z, A-Z), numbers (0-9), and - * underscores, and consist of 256 or fewer characters. - * - * Generated from protobuf field string id = 7 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $id = ''; - /** - * Optional. The etag associated with the entity, which can be retrieved with - * a [GetEntity][] request. Required for update and delete requests. - * - * Generated from protobuf field string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $etag = ''; - /** - * Required. Immutable. The type of entity. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Entity.Type type = 10 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - */ - protected $type = 0; - /** - * Required. Immutable. The ID of the asset associated with the storage - * location containing the entity data. The entity must be with in the same - * zone with the asset. - * - * Generated from protobuf field string asset = 11 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - */ - protected $asset = ''; - /** - * Required. Immutable. The storage path of the entity data. - * For Cloud Storage data, this is the fully-qualified path to the entity, - * such as `gs://bucket/path/to/data`. For BigQuery data, this is the name of - * the table resource, such as - * `projects/project_id/datasets/dataset_id/tables/table_id`. - * - * Generated from protobuf field string data_path = 12 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - */ - protected $data_path = ''; - /** - * Optional. The set of items within the data path constituting the data in - * the entity, represented as a glob path. Example: - * `gs://bucket/path/to/data/**/*.csv`. - * - * Generated from protobuf field string data_path_pattern = 13 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $data_path_pattern = ''; - /** - * Output only. The name of the associated Data Catalog entry. - * - * Generated from protobuf field string catalog_entry = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $catalog_entry = ''; - /** - * Required. Immutable. Identifies the storage system of the entity data. - * - * Generated from protobuf field .google.cloud.dataplex.v1.StorageSystem system = 15 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - */ - protected $system = 0; - /** - * Required. Identifies the storage format of the entity data. - * It does not apply to entities with data stored in BigQuery. - * - * Generated from protobuf field .google.cloud.dataplex.v1.StorageFormat format = 16 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $format = null; - /** - * Output only. Metadata stores that the entity is compatible with. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Entity.CompatibilityStatus compatibility = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $compatibility = null; - /** - * Output only. Identifies the access mechanism to the entity. Not user - * settable. - * - * Generated from protobuf field .google.cloud.dataplex.v1.StorageAccess access = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $access = null; - /** - * Output only. System generated unique ID for the Entity. This ID will be - * different if the Entity is deleted and re-created with the same name. - * - * Generated from protobuf field string uid = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - /** - * Required. The description of the data structure and layout. - * The schema is not included in list responses. It is only included in - * `SCHEMA` and `FULL` entity views of a `GetEntity` response. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Schema schema = 50 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $schema = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The resource name of the entity, of the form: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{id}`. - * @type string $display_name - * Optional. Display name must be shorter than or equal to 256 characters. - * @type string $description - * Optional. User friendly longer description text. Must be shorter than or - * equal to 1024 characters. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time when the entity was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time when the entity was last updated. - * @type string $id - * Required. A user-provided entity ID. It is mutable, and will be used as the - * published table name. Specifying a new ID in an update entity - * request will override the existing value. - * The ID must contain only letters (a-z, A-Z), numbers (0-9), and - * underscores, and consist of 256 or fewer characters. - * @type string $etag - * Optional. The etag associated with the entity, which can be retrieved with - * a [GetEntity][] request. Required for update and delete requests. - * @type int $type - * Required. Immutable. The type of entity. - * @type string $asset - * Required. Immutable. The ID of the asset associated with the storage - * location containing the entity data. The entity must be with in the same - * zone with the asset. - * @type string $data_path - * Required. Immutable. The storage path of the entity data. - * For Cloud Storage data, this is the fully-qualified path to the entity, - * such as `gs://bucket/path/to/data`. For BigQuery data, this is the name of - * the table resource, such as - * `projects/project_id/datasets/dataset_id/tables/table_id`. - * @type string $data_path_pattern - * Optional. The set of items within the data path constituting the data in - * the entity, represented as a glob path. Example: - * `gs://bucket/path/to/data/**/*.csv`. - * @type string $catalog_entry - * Output only. The name of the associated Data Catalog entry. - * @type int $system - * Required. Immutable. Identifies the storage system of the entity data. - * @type \Google\Cloud\Dataplex\V1\StorageFormat $format - * Required. Identifies the storage format of the entity data. - * It does not apply to entities with data stored in BigQuery. - * @type \Google\Cloud\Dataplex\V1\Entity\CompatibilityStatus $compatibility - * Output only. Metadata stores that the entity is compatible with. - * @type \Google\Cloud\Dataplex\V1\StorageAccess $access - * Output only. Identifies the access mechanism to the entity. Not user - * settable. - * @type string $uid - * Output only. System generated unique ID for the Entity. This ID will be - * different if the Entity is deleted and re-created with the same name. - * @type \Google\Cloud\Dataplex\V1\Schema $schema - * Required. The description of the data structure and layout. - * The schema is not included in list responses. It is only included in - * `SCHEMA` and `FULL` entity views of a `GetEntity` response. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Metadata::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The resource name of the entity, of the form: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The resource name of the entity, of the form: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. Display name must be shorter than or equal to 256 characters. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Optional. Display name must be shorter than or equal to 256 characters. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Optional. User friendly longer description text. Must be shorter than or - * equal to 1024 characters. - * - * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. User friendly longer description text. Must be shorter than or - * equal to 1024 characters. - * - * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Output only. The time when the entity was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time when the entity was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The time when the entity was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The time when the entity was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Required. A user-provided entity ID. It is mutable, and will be used as the - * published table name. Specifying a new ID in an update entity - * request will override the existing value. - * The ID must contain only letters (a-z, A-Z), numbers (0-9), and - * underscores, and consist of 256 or fewer characters. - * - * Generated from protobuf field string id = 7 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * Required. A user-provided entity ID. It is mutable, and will be used as the - * published table name. Specifying a new ID in an update entity - * request will override the existing value. - * The ID must contain only letters (a-z, A-Z), numbers (0-9), and - * underscores, and consist of 256 or fewer characters. - * - * Generated from protobuf field string id = 7 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setId($var) - { - GPBUtil::checkString($var, True); - $this->id = $var; - - return $this; - } - - /** - * Optional. The etag associated with the entity, which can be retrieved with - * a [GetEntity][] request. Required for update and delete requests. - * - * Generated from protobuf field string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * Optional. The etag associated with the entity, which can be retrieved with - * a [GetEntity][] request. Required for update and delete requests. - * - * Generated from protobuf field string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - - /** - * Required. Immutable. The type of entity. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Entity.Type type = 10 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Required. Immutable. The type of entity. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Entity.Type type = 10 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\Entity\Type::class); - $this->type = $var; - - return $this; - } - - /** - * Required. Immutable. The ID of the asset associated with the storage - * location containing the entity data. The entity must be with in the same - * zone with the asset. - * - * Generated from protobuf field string asset = 11 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getAsset() - { - return $this->asset; - } - - /** - * Required. Immutable. The ID of the asset associated with the storage - * location containing the entity data. The entity must be with in the same - * zone with the asset. - * - * Generated from protobuf field string asset = 11 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setAsset($var) - { - GPBUtil::checkString($var, True); - $this->asset = $var; - - return $this; - } - - /** - * Required. Immutable. The storage path of the entity data. - * For Cloud Storage data, this is the fully-qualified path to the entity, - * such as `gs://bucket/path/to/data`. For BigQuery data, this is the name of - * the table resource, such as - * `projects/project_id/datasets/dataset_id/tables/table_id`. - * - * Generated from protobuf field string data_path = 12 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getDataPath() - { - return $this->data_path; - } - - /** - * Required. Immutable. The storage path of the entity data. - * For Cloud Storage data, this is the fully-qualified path to the entity, - * such as `gs://bucket/path/to/data`. For BigQuery data, this is the name of - * the table resource, such as - * `projects/project_id/datasets/dataset_id/tables/table_id`. - * - * Generated from protobuf field string data_path = 12 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setDataPath($var) - { - GPBUtil::checkString($var, True); - $this->data_path = $var; - - return $this; - } - - /** - * Optional. The set of items within the data path constituting the data in - * the entity, represented as a glob path. Example: - * `gs://bucket/path/to/data/**/*.csv`. - * - * Generated from protobuf field string data_path_pattern = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDataPathPattern() - { - return $this->data_path_pattern; - } - - /** - * Optional. The set of items within the data path constituting the data in - * the entity, represented as a glob path. Example: - * `gs://bucket/path/to/data/**/*.csv`. - * - * Generated from protobuf field string data_path_pattern = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDataPathPattern($var) - { - GPBUtil::checkString($var, True); - $this->data_path_pattern = $var; - - return $this; - } - - /** - * Output only. The name of the associated Data Catalog entry. - * - * Generated from protobuf field string catalog_entry = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getCatalogEntry() - { - return $this->catalog_entry; - } - - /** - * Output only. The name of the associated Data Catalog entry. - * - * Generated from protobuf field string catalog_entry = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setCatalogEntry($var) - { - GPBUtil::checkString($var, True); - $this->catalog_entry = $var; - - return $this; - } - - /** - * Required. Immutable. Identifies the storage system of the entity data. - * - * Generated from protobuf field .google.cloud.dataplex.v1.StorageSystem system = 15 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @return int - */ - public function getSystem() - { - return $this->system; - } - - /** - * Required. Immutable. Identifies the storage system of the entity data. - * - * Generated from protobuf field .google.cloud.dataplex.v1.StorageSystem system = 15 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @param int $var - * @return $this - */ - public function setSystem($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\StorageSystem::class); - $this->system = $var; - - return $this; - } - - /** - * Required. Identifies the storage format of the entity data. - * It does not apply to entities with data stored in BigQuery. - * - * Generated from protobuf field .google.cloud.dataplex.v1.StorageFormat format = 16 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataplex\V1\StorageFormat|null - */ - public function getFormat() - { - return $this->format; - } - - public function hasFormat() - { - return isset($this->format); - } - - public function clearFormat() - { - unset($this->format); - } - - /** - * Required. Identifies the storage format of the entity data. - * It does not apply to entities with data stored in BigQuery. - * - * Generated from protobuf field .google.cloud.dataplex.v1.StorageFormat format = 16 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataplex\V1\StorageFormat $var - * @return $this - */ - public function setFormat($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\StorageFormat::class); - $this->format = $var; - - return $this; - } - - /** - * Output only. Metadata stores that the entity is compatible with. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Entity.CompatibilityStatus compatibility = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Dataplex\V1\Entity\CompatibilityStatus|null - */ - public function getCompatibility() - { - return $this->compatibility; - } - - public function hasCompatibility() - { - return isset($this->compatibility); - } - - public function clearCompatibility() - { - unset($this->compatibility); - } - - /** - * Output only. Metadata stores that the entity is compatible with. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Entity.CompatibilityStatus compatibility = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Dataplex\V1\Entity\CompatibilityStatus $var - * @return $this - */ - public function setCompatibility($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Entity\CompatibilityStatus::class); - $this->compatibility = $var; - - return $this; - } - - /** - * Output only. Identifies the access mechanism to the entity. Not user - * settable. - * - * Generated from protobuf field .google.cloud.dataplex.v1.StorageAccess access = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Dataplex\V1\StorageAccess|null - */ - public function getAccess() - { - return $this->access; - } - - public function hasAccess() - { - return isset($this->access); - } - - public function clearAccess() - { - unset($this->access); - } - - /** - * Output only. Identifies the access mechanism to the entity. Not user - * settable. - * - * Generated from protobuf field .google.cloud.dataplex.v1.StorageAccess access = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Dataplex\V1\StorageAccess $var - * @return $this - */ - public function setAccess($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\StorageAccess::class); - $this->access = $var; - - return $this; - } - - /** - * Output only. System generated unique ID for the Entity. This ID will be - * different if the Entity is deleted and re-created with the same name. - * - * Generated from protobuf field string uid = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. System generated unique ID for the Entity. This ID will be - * different if the Entity is deleted and re-created with the same name. - * - * Generated from protobuf field string uid = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - - /** - * Required. The description of the data structure and layout. - * The schema is not included in list responses. It is only included in - * `SCHEMA` and `FULL` entity views of a `GetEntity` response. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Schema schema = 50 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataplex\V1\Schema|null - */ - public function getSchema() - { - return $this->schema; - } - - public function hasSchema() - { - return isset($this->schema); - } - - public function clearSchema() - { - unset($this->schema); - } - - /** - * Required. The description of the data structure and layout. - * The schema is not included in list responses. It is only included in - * `SCHEMA` and `FULL` entity views of a `GetEntity` response. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Schema schema = 50 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataplex\V1\Schema $var - * @return $this - */ - public function setSchema($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Schema::class); - $this->schema = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Entity/CompatibilityStatus.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Entity/CompatibilityStatus.php deleted file mode 100644 index c329e3c6cc85..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Entity/CompatibilityStatus.php +++ /dev/null @@ -1,124 +0,0 @@ -google.cloud.dataplex.v1.Entity.CompatibilityStatus - */ -class CompatibilityStatus extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Whether this entity is compatible with Hive Metastore. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility hive_metastore = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $hive_metastore = null; - /** - * Output only. Whether this entity is compatible with BigQuery. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility bigquery = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $bigquery = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dataplex\V1\Entity\CompatibilityStatus\Compatibility $hive_metastore - * Output only. Whether this entity is compatible with Hive Metastore. - * @type \Google\Cloud\Dataplex\V1\Entity\CompatibilityStatus\Compatibility $bigquery - * Output only. Whether this entity is compatible with BigQuery. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Metadata::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Whether this entity is compatible with Hive Metastore. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility hive_metastore = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Dataplex\V1\Entity\CompatibilityStatus\Compatibility|null - */ - public function getHiveMetastore() - { - return $this->hive_metastore; - } - - public function hasHiveMetastore() - { - return isset($this->hive_metastore); - } - - public function clearHiveMetastore() - { - unset($this->hive_metastore); - } - - /** - * Output only. Whether this entity is compatible with Hive Metastore. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility hive_metastore = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Dataplex\V1\Entity\CompatibilityStatus\Compatibility $var - * @return $this - */ - public function setHiveMetastore($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Entity\CompatibilityStatus\Compatibility::class); - $this->hive_metastore = $var; - - return $this; - } - - /** - * Output only. Whether this entity is compatible with BigQuery. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility bigquery = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Dataplex\V1\Entity\CompatibilityStatus\Compatibility|null - */ - public function getBigquery() - { - return $this->bigquery; - } - - public function hasBigquery() - { - return isset($this->bigquery); - } - - public function clearBigquery() - { - unset($this->bigquery); - } - - /** - * Output only. Whether this entity is compatible with BigQuery. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility bigquery = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Dataplex\V1\Entity\CompatibilityStatus\Compatibility $var - * @return $this - */ - public function setBigquery($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Entity\CompatibilityStatus\Compatibility::class); - $this->bigquery = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CompatibilityStatus::class, \Google\Cloud\Dataplex\V1\Entity_CompatibilityStatus::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Entity/CompatibilityStatus/Compatibility.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Entity/CompatibilityStatus/Compatibility.php deleted file mode 100644 index 31fef738a26b..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Entity/CompatibilityStatus/Compatibility.php +++ /dev/null @@ -1,112 +0,0 @@ -google.cloud.dataplex.v1.Entity.CompatibilityStatus.Compatibility - */ -class Compatibility extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Whether the entity is compatible and can be represented in - * the metadata store. - * - * Generated from protobuf field bool compatible = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $compatible = false; - /** - * Output only. Provides additional detail if the entity is incompatible - * with the metadata store. - * - * Generated from protobuf field string reason = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $reason = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $compatible - * Output only. Whether the entity is compatible and can be represented in - * the metadata store. - * @type string $reason - * Output only. Provides additional detail if the entity is incompatible - * with the metadata store. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Metadata::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Whether the entity is compatible and can be represented in - * the metadata store. - * - * Generated from protobuf field bool compatible = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getCompatible() - { - return $this->compatible; - } - - /** - * Output only. Whether the entity is compatible and can be represented in - * the metadata store. - * - * Generated from protobuf field bool compatible = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setCompatible($var) - { - GPBUtil::checkBool($var); - $this->compatible = $var; - - return $this; - } - - /** - * Output only. Provides additional detail if the entity is incompatible - * with the metadata store. - * - * Generated from protobuf field string reason = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getReason() - { - return $this->reason; - } - - /** - * Output only. Provides additional detail if the entity is incompatible - * with the metadata store. - * - * Generated from protobuf field string reason = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setReason($var) - { - GPBUtil::checkString($var, True); - $this->reason = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Compatibility::class, \Google\Cloud\Dataplex\V1\Entity_CompatibilityStatus_Compatibility::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Entity/Type.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Entity/Type.php deleted file mode 100644 index 15f0ab139313..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Entity/Type.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.dataplex.v1.Entity.Type - */ -class Type -{ - /** - * Type unspecified. - * - * Generated from protobuf enum TYPE_UNSPECIFIED = 0; - */ - const TYPE_UNSPECIFIED = 0; - /** - * Structured and semi-structured data. - * - * Generated from protobuf enum TABLE = 1; - */ - const TABLE = 1; - /** - * Unstructured data. - * - * Generated from protobuf enum FILESET = 2; - */ - const FILESET = 2; - - private static $valueToName = [ - self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', - self::TABLE => 'TABLE', - self::FILESET => 'FILESET', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Type::class, \Google\Cloud\Dataplex\V1\Entity_Type::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Entry.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Entry.php deleted file mode 100644 index dca2b1ddd162..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Entry.php +++ /dev/null @@ -1,368 +0,0 @@ -google.cloud.dataplex.v1.Entry - */ -class Entry extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. The relative resource name of the Entry, of the form: - * projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Required. Immutable. The resource name of the EntryType used to create this - * Entry. - * - * Generated from protobuf field string entry_type = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - */ - protected $entry_type = ''; - /** - * Output only. The time when the Entry was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time when the Entry was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Optional. The Aspects attached to the Entry. - * The format for the key can be one of the following: - * 1. {projectId}.{locationId}.{aspectTypeId} (if the aspect is attached - * directly to the entry) - * 2. {projectId}.{locationId}.{aspectTypeId}@{path} (if the aspect is - * attached to an entry's path) - * - * Generated from protobuf field map aspects = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $aspects; - /** - * Optional. Immutable. The resource name of the parent entry. - * - * Generated from protobuf field string parent_entry = 10 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - */ - protected $parent_entry = ''; - /** - * Optional. A name for the entry that can reference it in an external system. - * The maximum size of the field is 4000 characters. - * - * Generated from protobuf field string fully_qualified_name = 12 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $fully_qualified_name = ''; - /** - * Optional. Source system related information for an entry. - * - * Generated from protobuf field .google.cloud.dataplex.v1.EntrySource entry_source = 15 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $entry_source = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. The relative resource name of the Entry, of the form: - * projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}. - * @type string $entry_type - * Required. Immutable. The resource name of the EntryType used to create this - * Entry. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time when the Entry was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time when the Entry was last updated. - * @type array|\Google\Protobuf\Internal\MapField $aspects - * Optional. The Aspects attached to the Entry. - * The format for the key can be one of the following: - * 1. {projectId}.{locationId}.{aspectTypeId} (if the aspect is attached - * directly to the entry) - * 2. {projectId}.{locationId}.{aspectTypeId}@{path} (if the aspect is - * attached to an entry's path) - * @type string $parent_entry - * Optional. Immutable. The resource name of the parent entry. - * @type string $fully_qualified_name - * Optional. A name for the entry that can reference it in an external system. - * The maximum size of the field is 4000 characters. - * @type \Google\Cloud\Dataplex\V1\EntrySource $entry_source - * Optional. Source system related information for an entry. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Catalog::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. The relative resource name of the Entry, of the form: - * projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. The relative resource name of the Entry, of the form: - * projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. Immutable. The resource name of the EntryType used to create this - * Entry. - * - * Generated from protobuf field string entry_type = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getEntryType() - { - return $this->entry_type; - } - - /** - * Required. Immutable. The resource name of the EntryType used to create this - * Entry. - * - * Generated from protobuf field string entry_type = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setEntryType($var) - { - GPBUtil::checkString($var, True); - $this->entry_type = $var; - - return $this; - } - - /** - * Output only. The time when the Entry was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time when the Entry was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The time when the Entry was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The time when the Entry was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Optional. The Aspects attached to the Entry. - * The format for the key can be one of the following: - * 1. {projectId}.{locationId}.{aspectTypeId} (if the aspect is attached - * directly to the entry) - * 2. {projectId}.{locationId}.{aspectTypeId}@{path} (if the aspect is - * attached to an entry's path) - * - * Generated from protobuf field map aspects = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getAspects() - { - return $this->aspects; - } - - /** - * Optional. The Aspects attached to the Entry. - * The format for the key can be one of the following: - * 1. {projectId}.{locationId}.{aspectTypeId} (if the aspect is attached - * directly to the entry) - * 2. {projectId}.{locationId}.{aspectTypeId}@{path} (if the aspect is - * attached to an entry's path) - * - * Generated from protobuf field map aspects = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setAspects($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\Aspect::class); - $this->aspects = $arr; - - return $this; - } - - /** - * Optional. Immutable. The resource name of the parent entry. - * - * Generated from protobuf field string parent_entry = 10 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getParentEntry() - { - return $this->parent_entry; - } - - /** - * Optional. Immutable. The resource name of the parent entry. - * - * Generated from protobuf field string parent_entry = 10 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setParentEntry($var) - { - GPBUtil::checkString($var, True); - $this->parent_entry = $var; - - return $this; - } - - /** - * Optional. A name for the entry that can reference it in an external system. - * The maximum size of the field is 4000 characters. - * - * Generated from protobuf field string fully_qualified_name = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFullyQualifiedName() - { - return $this->fully_qualified_name; - } - - /** - * Optional. A name for the entry that can reference it in an external system. - * The maximum size of the field is 4000 characters. - * - * Generated from protobuf field string fully_qualified_name = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFullyQualifiedName($var) - { - GPBUtil::checkString($var, True); - $this->fully_qualified_name = $var; - - return $this; - } - - /** - * Optional. Source system related information for an entry. - * - * Generated from protobuf field .google.cloud.dataplex.v1.EntrySource entry_source = 15 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataplex\V1\EntrySource|null - */ - public function getEntrySource() - { - return $this->entry_source; - } - - public function hasEntrySource() - { - return isset($this->entry_source); - } - - public function clearEntrySource() - { - unset($this->entry_source); - } - - /** - * Optional. Source system related information for an entry. - * - * Generated from protobuf field .google.cloud.dataplex.v1.EntrySource entry_source = 15 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataplex\V1\EntrySource $var - * @return $this - */ - public function setEntrySource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\EntrySource::class); - $this->entry_source = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/EntryGroup.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/EntryGroup.php deleted file mode 100644 index 58bc94c0a32a..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/EntryGroup.php +++ /dev/null @@ -1,383 +0,0 @@ -google.cloud.dataplex.v1.EntryGroup - */ -class EntryGroup extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The relative resource name of the EntryGroup, of the form: - * projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Output only. System generated globally unique ID for the EntryGroup. This - * ID will be different if the EntryGroup is deleted and re-created with the - * same name. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - /** - * Output only. The time when the EntryGroup was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time when the EntryGroup was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Optional. Description of the EntryGroup. - * - * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Optional. User friendly display name. - * - * Generated from protobuf field string display_name = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $display_name = ''; - /** - * Optional. User-defined labels for the EntryGroup. - * - * Generated from protobuf field map labels = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * This checksum is computed by the server based on the value of other - * fields, and may be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * - * Generated from protobuf field string etag = 8; - */ - protected $etag = ''; - /** - * Output only. Denotes the transfer status of the Entry Group. It is - * unspecified for Entry Group created from Dataplex API. - * - * Generated from protobuf field .google.cloud.dataplex.v1.TransferStatus transfer_status = 202 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $transfer_status = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The relative resource name of the EntryGroup, of the form: - * projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}. - * @type string $uid - * Output only. System generated globally unique ID for the EntryGroup. This - * ID will be different if the EntryGroup is deleted and re-created with the - * same name. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time when the EntryGroup was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time when the EntryGroup was last updated. - * @type string $description - * Optional. Description of the EntryGroup. - * @type string $display_name - * Optional. User friendly display name. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. User-defined labels for the EntryGroup. - * @type string $etag - * This checksum is computed by the server based on the value of other - * fields, and may be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * @type int $transfer_status - * Output only. Denotes the transfer status of the Entry Group. It is - * unspecified for Entry Group created from Dataplex API. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Catalog::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The relative resource name of the EntryGroup, of the form: - * projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The relative resource name of the EntryGroup, of the form: - * projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. System generated globally unique ID for the EntryGroup. This - * ID will be different if the EntryGroup is deleted and re-created with the - * same name. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. System generated globally unique ID for the EntryGroup. This - * ID will be different if the EntryGroup is deleted and re-created with the - * same name. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - - /** - * Output only. The time when the EntryGroup was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time when the EntryGroup was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The time when the EntryGroup was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The time when the EntryGroup was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Optional. Description of the EntryGroup. - * - * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. Description of the EntryGroup. - * - * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Optional. User friendly display name. - * - * Generated from protobuf field string display_name = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Optional. User friendly display name. - * - * Generated from protobuf field string display_name = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Optional. User-defined labels for the EntryGroup. - * - * Generated from protobuf field map labels = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. User-defined labels for the EntryGroup. - * - * Generated from protobuf field map labels = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * This checksum is computed by the server based on the value of other - * fields, and may be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * - * Generated from protobuf field string etag = 8; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * This checksum is computed by the server based on the value of other - * fields, and may be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * - * Generated from protobuf field string etag = 8; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - - /** - * Output only. Denotes the transfer status of the Entry Group. It is - * unspecified for Entry Group created from Dataplex API. - * - * Generated from protobuf field .google.cloud.dataplex.v1.TransferStatus transfer_status = 202 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getTransferStatus() - { - return $this->transfer_status; - } - - /** - * Output only. Denotes the transfer status of the Entry Group. It is - * unspecified for Entry Group created from Dataplex API. - * - * Generated from protobuf field .google.cloud.dataplex.v1.TransferStatus transfer_status = 202 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setTransferStatus($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\TransferStatus::class); - $this->transfer_status = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/EntrySource.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/EntrySource.php deleted file mode 100644 index 6560291d3978..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/EntrySource.php +++ /dev/null @@ -1,384 +0,0 @@ -google.cloud.dataplex.v1.EntrySource - */ -class EntrySource extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the resource in the source system. - * The maximum size of the field is 4000 characters. - * - * Generated from protobuf field string resource = 1; - */ - protected $resource = ''; - /** - * The name of the source system. - * The maximum size of the field is 64 characters. - * - * Generated from protobuf field string system = 2; - */ - protected $system = ''; - /** - * The platform containing the source system. - * The maximum size of the field is 64 characters. - * - * Generated from protobuf field string platform = 3; - */ - protected $platform = ''; - /** - * User friendly display name. - * The maximum size of the field is 500 characters. - * - * Generated from protobuf field string display_name = 5; - */ - protected $display_name = ''; - /** - * Description of the Entry. - * The maximum size of the field is 2000 characters. - * - * Generated from protobuf field string description = 6; - */ - protected $description = ''; - /** - * User-defined labels. - * The maximum size of keys and values is 128 characters each. - * - * Generated from protobuf field map labels = 7; - */ - private $labels; - /** - * Immutable. The ancestors of the Entry in the source system. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.EntrySource.Ancestor ancestors = 9 [(.google.api.field_behavior) = IMMUTABLE]; - */ - private $ancestors; - /** - * The create time of the resource in the source system. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 10; - */ - protected $create_time = null; - /** - * The update time of the resource in the source system. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 11; - */ - protected $update_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $resource - * The name of the resource in the source system. - * The maximum size of the field is 4000 characters. - * @type string $system - * The name of the source system. - * The maximum size of the field is 64 characters. - * @type string $platform - * The platform containing the source system. - * The maximum size of the field is 64 characters. - * @type string $display_name - * User friendly display name. - * The maximum size of the field is 500 characters. - * @type string $description - * Description of the Entry. - * The maximum size of the field is 2000 characters. - * @type array|\Google\Protobuf\Internal\MapField $labels - * User-defined labels. - * The maximum size of keys and values is 128 characters each. - * @type array<\Google\Cloud\Dataplex\V1\EntrySource\Ancestor>|\Google\Protobuf\Internal\RepeatedField $ancestors - * Immutable. The ancestors of the Entry in the source system. - * @type \Google\Protobuf\Timestamp $create_time - * The create time of the resource in the source system. - * @type \Google\Protobuf\Timestamp $update_time - * The update time of the resource in the source system. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Catalog::initOnce(); - parent::__construct($data); - } - - /** - * The name of the resource in the source system. - * The maximum size of the field is 4000 characters. - * - * Generated from protobuf field string resource = 1; - * @return string - */ - public function getResource() - { - return $this->resource; - } - - /** - * The name of the resource in the source system. - * The maximum size of the field is 4000 characters. - * - * Generated from protobuf field string resource = 1; - * @param string $var - * @return $this - */ - public function setResource($var) - { - GPBUtil::checkString($var, True); - $this->resource = $var; - - return $this; - } - - /** - * The name of the source system. - * The maximum size of the field is 64 characters. - * - * Generated from protobuf field string system = 2; - * @return string - */ - public function getSystem() - { - return $this->system; - } - - /** - * The name of the source system. - * The maximum size of the field is 64 characters. - * - * Generated from protobuf field string system = 2; - * @param string $var - * @return $this - */ - public function setSystem($var) - { - GPBUtil::checkString($var, True); - $this->system = $var; - - return $this; - } - - /** - * The platform containing the source system. - * The maximum size of the field is 64 characters. - * - * Generated from protobuf field string platform = 3; - * @return string - */ - public function getPlatform() - { - return $this->platform; - } - - /** - * The platform containing the source system. - * The maximum size of the field is 64 characters. - * - * Generated from protobuf field string platform = 3; - * @param string $var - * @return $this - */ - public function setPlatform($var) - { - GPBUtil::checkString($var, True); - $this->platform = $var; - - return $this; - } - - /** - * User friendly display name. - * The maximum size of the field is 500 characters. - * - * Generated from protobuf field string display_name = 5; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * User friendly display name. - * The maximum size of the field is 500 characters. - * - * Generated from protobuf field string display_name = 5; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Description of the Entry. - * The maximum size of the field is 2000 characters. - * - * Generated from protobuf field string description = 6; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Description of the Entry. - * The maximum size of the field is 2000 characters. - * - * Generated from protobuf field string description = 6; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * User-defined labels. - * The maximum size of keys and values is 128 characters each. - * - * Generated from protobuf field map labels = 7; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * User-defined labels. - * The maximum size of keys and values is 128 characters each. - * - * Generated from protobuf field map labels = 7; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Immutable. The ancestors of the Entry in the source system. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.EntrySource.Ancestor ancestors = 9 [(.google.api.field_behavior) = IMMUTABLE]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAncestors() - { - return $this->ancestors; - } - - /** - * Immutable. The ancestors of the Entry in the source system. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.EntrySource.Ancestor ancestors = 9 [(.google.api.field_behavior) = IMMUTABLE]; - * @param array<\Google\Cloud\Dataplex\V1\EntrySource\Ancestor>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAncestors($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\EntrySource\Ancestor::class); - $this->ancestors = $arr; - - return $this; - } - - /** - * The create time of the resource in the source system. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 10; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * The create time of the resource in the source system. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 10; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * The update time of the resource in the source system. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 11; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * The update time of the resource in the source system. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 11; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/EntrySource/Ancestor.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/EntrySource/Ancestor.php deleted file mode 100644 index 510aa7767622..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/EntrySource/Ancestor.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.dataplex.v1.EntrySource.Ancestor - */ -class Ancestor extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The name of the ancestor resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $name = ''; - /** - * Optional. The type of the ancestor resource. - * - * Generated from protobuf field string type = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $type = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Optional. The name of the ancestor resource. - * @type string $type - * Optional. The type of the ancestor resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Catalog::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The name of the ancestor resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Optional. The name of the ancestor resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. The type of the ancestor resource. - * - * Generated from protobuf field string type = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * Optional. The type of the ancestor resource. - * - * Generated from protobuf field string type = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkString($var, True); - $this->type = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Ancestor::class, \Google\Cloud\Dataplex\V1\EntrySource_Ancestor::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/EntryType.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/EntryType.php deleted file mode 100644 index a5a4dcc45944..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/EntryType.php +++ /dev/null @@ -1,533 +0,0 @@ -google.cloud.dataplex.v1.EntryType - */ -class EntryType extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The relative resource name of the EntryType, of the form: - * projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Output only. System generated globally unique ID for the EntryType. This ID - * will be different if the EntryType is deleted and re-created with the same - * name. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - /** - * Output only. The time when the EntryType was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time when the EntryType was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Optional. Description of the EntryType. - * - * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Optional. User friendly display name. - * - * Generated from protobuf field string display_name = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $display_name = ''; - /** - * Optional. User-defined labels for the EntryType. - * - * Generated from protobuf field map labels = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * Optional. This checksum is computed by the server based on the value of - * other fields, and may be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * - * Generated from protobuf field string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $etag = ''; - /** - * Optional. Indicates the class this Entry Type belongs to, for example, - * TABLE, DATABASE, MODEL. - * - * Generated from protobuf field repeated string type_aliases = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $type_aliases; - /** - * Optional. The platform that Entries of this type belongs to. - * - * Generated from protobuf field string platform = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $platform = ''; - /** - * Optional. The system that Entries of this type belongs to. Examples include - * CloudSQL, MariaDB etc - * - * Generated from protobuf field string system = 11 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $system = ''; - /** - * AspectInfo for the entry type. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.EntryType.AspectInfo required_aspects = 50; - */ - private $required_aspects; - /** - * Immutable. Authorization defined for this type. - * - * Generated from protobuf field .google.cloud.dataplex.v1.EntryType.Authorization authorization = 51 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $authorization = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The relative resource name of the EntryType, of the form: - * projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}. - * @type string $uid - * Output only. System generated globally unique ID for the EntryType. This ID - * will be different if the EntryType is deleted and re-created with the same - * name. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time when the EntryType was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time when the EntryType was last updated. - * @type string $description - * Optional. Description of the EntryType. - * @type string $display_name - * Optional. User friendly display name. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. User-defined labels for the EntryType. - * @type string $etag - * Optional. This checksum is computed by the server based on the value of - * other fields, and may be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * @type array|\Google\Protobuf\Internal\RepeatedField $type_aliases - * Optional. Indicates the class this Entry Type belongs to, for example, - * TABLE, DATABASE, MODEL. - * @type string $platform - * Optional. The platform that Entries of this type belongs to. - * @type string $system - * Optional. The system that Entries of this type belongs to. Examples include - * CloudSQL, MariaDB etc - * @type array<\Google\Cloud\Dataplex\V1\EntryType\AspectInfo>|\Google\Protobuf\Internal\RepeatedField $required_aspects - * AspectInfo for the entry type. - * @type \Google\Cloud\Dataplex\V1\EntryType\Authorization $authorization - * Immutable. Authorization defined for this type. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Catalog::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The relative resource name of the EntryType, of the form: - * projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The relative resource name of the EntryType, of the form: - * projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. System generated globally unique ID for the EntryType. This ID - * will be different if the EntryType is deleted and re-created with the same - * name. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. System generated globally unique ID for the EntryType. This ID - * will be different if the EntryType is deleted and re-created with the same - * name. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - - /** - * Output only. The time when the EntryType was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time when the EntryType was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The time when the EntryType was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The time when the EntryType was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Optional. Description of the EntryType. - * - * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. Description of the EntryType. - * - * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Optional. User friendly display name. - * - * Generated from protobuf field string display_name = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Optional. User friendly display name. - * - * Generated from protobuf field string display_name = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Optional. User-defined labels for the EntryType. - * - * Generated from protobuf field map labels = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. User-defined labels for the EntryType. - * - * Generated from protobuf field map labels = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Optional. This checksum is computed by the server based on the value of - * other fields, and may be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * - * Generated from protobuf field string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * Optional. This checksum is computed by the server based on the value of - * other fields, and may be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * - * Generated from protobuf field string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - - /** - * Optional. Indicates the class this Entry Type belongs to, for example, - * TABLE, DATABASE, MODEL. - * - * Generated from protobuf field repeated string type_aliases = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTypeAliases() - { - return $this->type_aliases; - } - - /** - * Optional. Indicates the class this Entry Type belongs to, for example, - * TABLE, DATABASE, MODEL. - * - * Generated from protobuf field repeated string type_aliases = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTypeAliases($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->type_aliases = $arr; - - return $this; - } - - /** - * Optional. The platform that Entries of this type belongs to. - * - * Generated from protobuf field string platform = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPlatform() - { - return $this->platform; - } - - /** - * Optional. The platform that Entries of this type belongs to. - * - * Generated from protobuf field string platform = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPlatform($var) - { - GPBUtil::checkString($var, True); - $this->platform = $var; - - return $this; - } - - /** - * Optional. The system that Entries of this type belongs to. Examples include - * CloudSQL, MariaDB etc - * - * Generated from protobuf field string system = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getSystem() - { - return $this->system; - } - - /** - * Optional. The system that Entries of this type belongs to. Examples include - * CloudSQL, MariaDB etc - * - * Generated from protobuf field string system = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setSystem($var) - { - GPBUtil::checkString($var, True); - $this->system = $var; - - return $this; - } - - /** - * AspectInfo for the entry type. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.EntryType.AspectInfo required_aspects = 50; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRequiredAspects() - { - return $this->required_aspects; - } - - /** - * AspectInfo for the entry type. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.EntryType.AspectInfo required_aspects = 50; - * @param array<\Google\Cloud\Dataplex\V1\EntryType\AspectInfo>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRequiredAspects($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\EntryType\AspectInfo::class); - $this->required_aspects = $arr; - - return $this; - } - - /** - * Immutable. Authorization defined for this type. - * - * Generated from protobuf field .google.cloud.dataplex.v1.EntryType.Authorization authorization = 51 [(.google.api.field_behavior) = IMMUTABLE]; - * @return \Google\Cloud\Dataplex\V1\EntryType\Authorization|null - */ - public function getAuthorization() - { - return $this->authorization; - } - - public function hasAuthorization() - { - return isset($this->authorization); - } - - public function clearAuthorization() - { - unset($this->authorization); - } - - /** - * Immutable. Authorization defined for this type. - * - * Generated from protobuf field .google.cloud.dataplex.v1.EntryType.Authorization authorization = 51 [(.google.api.field_behavior) = IMMUTABLE]; - * @param \Google\Cloud\Dataplex\V1\EntryType\Authorization $var - * @return $this - */ - public function setAuthorization($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\EntryType\Authorization::class); - $this->authorization = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/EntryType/AspectInfo.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/EntryType/AspectInfo.php deleted file mode 100644 index 550098594270..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/EntryType/AspectInfo.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.dataplex.v1.EntryType.AspectInfo - */ -class AspectInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Required aspect type for the entry type. - * - * Generated from protobuf field string type = 1 [(.google.api.resource_reference) = { - */ - protected $type = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $type - * Required aspect type for the entry type. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Catalog::initOnce(); - parent::__construct($data); - } - - /** - * Required aspect type for the entry type. - * - * Generated from protobuf field string type = 1 [(.google.api.resource_reference) = { - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * Required aspect type for the entry type. - * - * Generated from protobuf field string type = 1 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkString($var, True); - $this->type = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(AspectInfo::class, \Google\Cloud\Dataplex\V1\EntryType_AspectInfo::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/EntryType/Authorization.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/EntryType/Authorization.php deleted file mode 100644 index ae3017d37960..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/EntryType/Authorization.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.dataplex.v1.EntryType.Authorization - */ -class Authorization extends \Google\Protobuf\Internal\Message -{ - /** - * Immutable. The IAM permission grantable on the Entry Group to allow - * access to instantiate Entries of Dataplex owned Entry Types, only - * settable for Dataplex owned Types. - * - * Generated from protobuf field string alternate_use_permission = 1 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $alternate_use_permission = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $alternate_use_permission - * Immutable. The IAM permission grantable on the Entry Group to allow - * access to instantiate Entries of Dataplex owned Entry Types, only - * settable for Dataplex owned Types. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Catalog::initOnce(); - parent::__construct($data); - } - - /** - * Immutable. The IAM permission grantable on the Entry Group to allow - * access to instantiate Entries of Dataplex owned Entry Types, only - * settable for Dataplex owned Types. - * - * Generated from protobuf field string alternate_use_permission = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getAlternateUsePermission() - { - return $this->alternate_use_permission; - } - - /** - * Immutable. The IAM permission grantable on the Entry Group to allow - * access to instantiate Entries of Dataplex owned Entry Types, only - * settable for Dataplex owned Types. - * - * Generated from protobuf field string alternate_use_permission = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setAlternateUsePermission($var) - { - GPBUtil::checkString($var, True); - $this->alternate_use_permission = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Authorization::class, \Google\Cloud\Dataplex\V1\EntryType_Authorization::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/EntryView.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/EntryView.php deleted file mode 100644 index 8070bb374123..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/EntryView.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.dataplex.v1.EntryView - */ -class EntryView -{ - /** - * Unspecified EntryView. Defaults to FULL. - * - * Generated from protobuf enum ENTRY_VIEW_UNSPECIFIED = 0; - */ - const ENTRY_VIEW_UNSPECIFIED = 0; - /** - * Returns entry only, without aspects. - * - * Generated from protobuf enum BASIC = 1; - */ - const BASIC = 1; - /** - * Returns all required aspects as well as the keys of all non-required - * aspects. - * - * Generated from protobuf enum FULL = 2; - */ - const FULL = 2; - /** - * Returns aspects matching custom fields in GetEntryRequest. If the number of - * aspects would exceed 100, the first 100 will be returned. - * - * Generated from protobuf enum CUSTOM = 3; - */ - const CUSTOM = 3; - /** - * Returns all aspects. If the number of aspects would exceed 100, the first - * 100 will be returned. - * - * Generated from protobuf enum ALL = 4; - */ - const ALL = 4; - - private static $valueToName = [ - self::ENTRY_VIEW_UNSPECIFIED => 'ENTRY_VIEW_UNSPECIFIED', - self::BASIC => 'BASIC', - self::FULL => 'FULL', - self::CUSTOM => 'CUSTOM', - self::ALL => 'ALL', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Environment.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Environment.php deleted file mode 100644 index 3236d2eab3a1..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Environment.php +++ /dev/null @@ -1,518 +0,0 @@ -google.cloud.dataplex.v1.Environment - */ -class Environment extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The relative resource name of the environment, of the form: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. User friendly display name. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $display_name = ''; - /** - * Output only. System generated globally unique ID for the environment. This - * ID will be different if the environment is deleted and re-created with the - * same name. - * - * Generated from protobuf field string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - /** - * Output only. Environment creation time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time when the environment was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Optional. User defined labels for the environment. - * - * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * Optional. Description of the environment. - * - * Generated from protobuf field string description = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Output only. Current state of the environment. - * - * Generated from protobuf field .google.cloud.dataplex.v1.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Required. Infrastructure specification for the Environment. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Environment.InfrastructureSpec infrastructure_spec = 100 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $infrastructure_spec = null; - /** - * Optional. Configuration for sessions created for this environment. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Environment.SessionSpec session_spec = 101 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $session_spec = null; - /** - * Output only. Status of sessions created for this environment. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Environment.SessionStatus session_status = 102 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $session_status = null; - /** - * Output only. URI Endpoints to access sessions associated with the - * Environment. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Environment.Endpoints endpoints = 200 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $endpoints = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The relative resource name of the environment, of the form: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id} - * @type string $display_name - * Optional. User friendly display name. - * @type string $uid - * Output only. System generated globally unique ID for the environment. This - * ID will be different if the environment is deleted and re-created with the - * same name. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. Environment creation time. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time when the environment was last updated. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. User defined labels for the environment. - * @type string $description - * Optional. Description of the environment. - * @type int $state - * Output only. Current state of the environment. - * @type \Google\Cloud\Dataplex\V1\Environment\InfrastructureSpec $infrastructure_spec - * Required. Infrastructure specification for the Environment. - * @type \Google\Cloud\Dataplex\V1\Environment\SessionSpec $session_spec - * Optional. Configuration for sessions created for this environment. - * @type \Google\Cloud\Dataplex\V1\Environment\SessionStatus $session_status - * Output only. Status of sessions created for this environment. - * @type \Google\Cloud\Dataplex\V1\Environment\Endpoints $endpoints - * Output only. URI Endpoints to access sessions associated with the - * Environment. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Analyze::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The relative resource name of the environment, of the form: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The relative resource name of the environment, of the form: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. User friendly display name. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Optional. User friendly display name. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Output only. System generated globally unique ID for the environment. This - * ID will be different if the environment is deleted and re-created with the - * same name. - * - * Generated from protobuf field string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. System generated globally unique ID for the environment. This - * ID will be different if the environment is deleted and re-created with the - * same name. - * - * Generated from protobuf field string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - - /** - * Output only. Environment creation time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. Environment creation time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The time when the environment was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The time when the environment was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Optional. User defined labels for the environment. - * - * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. User defined labels for the environment. - * - * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Optional. Description of the environment. - * - * Generated from protobuf field string description = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. Description of the environment. - * - * Generated from protobuf field string description = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Output only. Current state of the environment. - * - * Generated from protobuf field .google.cloud.dataplex.v1.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. Current state of the environment. - * - * Generated from protobuf field .google.cloud.dataplex.v1.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\State::class); - $this->state = $var; - - return $this; - } - - /** - * Required. Infrastructure specification for the Environment. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Environment.InfrastructureSpec infrastructure_spec = 100 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataplex\V1\Environment\InfrastructureSpec|null - */ - public function getInfrastructureSpec() - { - return $this->infrastructure_spec; - } - - public function hasInfrastructureSpec() - { - return isset($this->infrastructure_spec); - } - - public function clearInfrastructureSpec() - { - unset($this->infrastructure_spec); - } - - /** - * Required. Infrastructure specification for the Environment. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Environment.InfrastructureSpec infrastructure_spec = 100 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataplex\V1\Environment\InfrastructureSpec $var - * @return $this - */ - public function setInfrastructureSpec($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Environment\InfrastructureSpec::class); - $this->infrastructure_spec = $var; - - return $this; - } - - /** - * Optional. Configuration for sessions created for this environment. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Environment.SessionSpec session_spec = 101 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataplex\V1\Environment\SessionSpec|null - */ - public function getSessionSpec() - { - return $this->session_spec; - } - - public function hasSessionSpec() - { - return isset($this->session_spec); - } - - public function clearSessionSpec() - { - unset($this->session_spec); - } - - /** - * Optional. Configuration for sessions created for this environment. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Environment.SessionSpec session_spec = 101 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataplex\V1\Environment\SessionSpec $var - * @return $this - */ - public function setSessionSpec($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Environment\SessionSpec::class); - $this->session_spec = $var; - - return $this; - } - - /** - * Output only. Status of sessions created for this environment. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Environment.SessionStatus session_status = 102 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Dataplex\V1\Environment\SessionStatus|null - */ - public function getSessionStatus() - { - return $this->session_status; - } - - public function hasSessionStatus() - { - return isset($this->session_status); - } - - public function clearSessionStatus() - { - unset($this->session_status); - } - - /** - * Output only. Status of sessions created for this environment. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Environment.SessionStatus session_status = 102 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Dataplex\V1\Environment\SessionStatus $var - * @return $this - */ - public function setSessionStatus($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Environment\SessionStatus::class); - $this->session_status = $var; - - return $this; - } - - /** - * Output only. URI Endpoints to access sessions associated with the - * Environment. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Environment.Endpoints endpoints = 200 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Dataplex\V1\Environment\Endpoints|null - */ - public function getEndpoints() - { - return $this->endpoints; - } - - public function hasEndpoints() - { - return isset($this->endpoints); - } - - public function clearEndpoints() - { - unset($this->endpoints); - } - - /** - * Output only. URI Endpoints to access sessions associated with the - * Environment. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Environment.Endpoints endpoints = 200 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Dataplex\V1\Environment\Endpoints $var - * @return $this - */ - public function setEndpoints($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Environment\Endpoints::class); - $this->endpoints = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Environment/Endpoints.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Environment/Endpoints.php deleted file mode 100644 index 018f2692a575..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Environment/Endpoints.php +++ /dev/null @@ -1,104 +0,0 @@ -google.cloud.dataplex.v1.Environment.Endpoints - */ -class Endpoints extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. URI to serve notebook APIs - * - * Generated from protobuf field string notebooks = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $notebooks = ''; - /** - * Output only. URI to serve SQL APIs - * - * Generated from protobuf field string sql = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $sql = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $notebooks - * Output only. URI to serve notebook APIs - * @type string $sql - * Output only. URI to serve SQL APIs - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Analyze::initOnce(); - parent::__construct($data); - } - - /** - * Output only. URI to serve notebook APIs - * - * Generated from protobuf field string notebooks = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getNotebooks() - { - return $this->notebooks; - } - - /** - * Output only. URI to serve notebook APIs - * - * Generated from protobuf field string notebooks = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setNotebooks($var) - { - GPBUtil::checkString($var, True); - $this->notebooks = $var; - - return $this; - } - - /** - * Output only. URI to serve SQL APIs - * - * Generated from protobuf field string sql = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getSql() - { - return $this->sql; - } - - /** - * Output only. URI to serve SQL APIs - * - * Generated from protobuf field string sql = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setSql($var) - { - GPBUtil::checkString($var, True); - $this->sql = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Endpoints::class, \Google\Cloud\Dataplex\V1\Environment_Endpoints::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Environment/InfrastructureSpec.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Environment/InfrastructureSpec.php deleted file mode 100644 index b5402934b75d..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Environment/InfrastructureSpec.php +++ /dev/null @@ -1,123 +0,0 @@ -google.cloud.dataplex.v1.Environment.InfrastructureSpec - */ -class InfrastructureSpec extends \Google\Protobuf\Internal\Message -{ - protected $resources; - protected $runtime; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dataplex\V1\Environment\InfrastructureSpec\ComputeResources $compute - * Optional. Compute resources needed for analyze interactive workloads. - * @type \Google\Cloud\Dataplex\V1\Environment\InfrastructureSpec\OsImageRuntime $os_image - * Required. Software Runtime Configuration for analyze interactive - * workloads. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Analyze::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Compute resources needed for analyze interactive workloads. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources compute = 50 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataplex\V1\Environment\InfrastructureSpec\ComputeResources|null - */ - public function getCompute() - { - return $this->readOneof(50); - } - - public function hasCompute() - { - return $this->hasOneof(50); - } - - /** - * Optional. Compute resources needed for analyze interactive workloads. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources compute = 50 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataplex\V1\Environment\InfrastructureSpec\ComputeResources $var - * @return $this - */ - public function setCompute($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Environment\InfrastructureSpec\ComputeResources::class); - $this->writeOneof(50, $var); - - return $this; - } - - /** - * Required. Software Runtime Configuration for analyze interactive - * workloads. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime os_image = 100 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataplex\V1\Environment\InfrastructureSpec\OsImageRuntime|null - */ - public function getOsImage() - { - return $this->readOneof(100); - } - - public function hasOsImage() - { - return $this->hasOneof(100); - } - - /** - * Required. Software Runtime Configuration for analyze interactive - * workloads. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime os_image = 100 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataplex\V1\Environment\InfrastructureSpec\OsImageRuntime $var - * @return $this - */ - public function setOsImage($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Environment\InfrastructureSpec\OsImageRuntime::class); - $this->writeOneof(100, $var); - - return $this; - } - - /** - * @return string - */ - public function getResources() - { - return $this->whichOneof("resources"); - } - - /** - * @return string - */ - public function getRuntime() - { - return $this->whichOneof("runtime"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(InfrastructureSpec::class, \Google\Cloud\Dataplex\V1\Environment_InfrastructureSpec::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Environment/InfrastructureSpec/ComputeResources.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Environment/InfrastructureSpec/ComputeResources.php deleted file mode 100644 index 08481337d023..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Environment/InfrastructureSpec/ComputeResources.php +++ /dev/null @@ -1,146 +0,0 @@ -google.cloud.dataplex.v1.Environment.InfrastructureSpec.ComputeResources - */ -class ComputeResources extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Size in GB of the disk. Default is 100 GB. - * - * Generated from protobuf field int32 disk_size_gb = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $disk_size_gb = 0; - /** - * Optional. Total number of nodes in the sessions created for this - * environment. - * - * Generated from protobuf field int32 node_count = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $node_count = 0; - /** - * Optional. Max configurable nodes. - * If max_node_count > node_count, then auto-scaling is enabled. - * - * Generated from protobuf field int32 max_node_count = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $max_node_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $disk_size_gb - * Optional. Size in GB of the disk. Default is 100 GB. - * @type int $node_count - * Optional. Total number of nodes in the sessions created for this - * environment. - * @type int $max_node_count - * Optional. Max configurable nodes. - * If max_node_count > node_count, then auto-scaling is enabled. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Analyze::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Size in GB of the disk. Default is 100 GB. - * - * Generated from protobuf field int32 disk_size_gb = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getDiskSizeGb() - { - return $this->disk_size_gb; - } - - /** - * Optional. Size in GB of the disk. Default is 100 GB. - * - * Generated from protobuf field int32 disk_size_gb = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setDiskSizeGb($var) - { - GPBUtil::checkInt32($var); - $this->disk_size_gb = $var; - - return $this; - } - - /** - * Optional. Total number of nodes in the sessions created for this - * environment. - * - * Generated from protobuf field int32 node_count = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getNodeCount() - { - return $this->node_count; - } - - /** - * Optional. Total number of nodes in the sessions created for this - * environment. - * - * Generated from protobuf field int32 node_count = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setNodeCount($var) - { - GPBUtil::checkInt32($var); - $this->node_count = $var; - - return $this; - } - - /** - * Optional. Max configurable nodes. - * If max_node_count > node_count, then auto-scaling is enabled. - * - * Generated from protobuf field int32 max_node_count = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getMaxNodeCount() - { - return $this->max_node_count; - } - - /** - * Optional. Max configurable nodes. - * If max_node_count > node_count, then auto-scaling is enabled. - * - * Generated from protobuf field int32 max_node_count = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setMaxNodeCount($var) - { - GPBUtil::checkInt32($var); - $this->max_node_count = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ComputeResources::class, \Google\Cloud\Dataplex\V1\Environment_InfrastructureSpec_ComputeResources::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Environment/InfrastructureSpec/OsImageRuntime.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Environment/InfrastructureSpec/OsImageRuntime.php deleted file mode 100644 index 774611919e01..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Environment/InfrastructureSpec/OsImageRuntime.php +++ /dev/null @@ -1,200 +0,0 @@ -google.cloud.dataplex.v1.Environment.InfrastructureSpec.OsImageRuntime - */ -class OsImageRuntime extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Dataplex Image version. - * - * Generated from protobuf field string image_version = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $image_version = ''; - /** - * Optional. List of Java jars to be included in the runtime environment. - * Valid input includes Cloud Storage URIs to Jar binaries. - * For example, gs://bucket-name/my/path/to/file.jar - * - * Generated from protobuf field repeated string java_libraries = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $java_libraries; - /** - * Optional. A list of python packages to be installed. - * Valid formats include Cloud Storage URI to a PIP installable library. - * For example, gs://bucket-name/my/path/to/lib.tar.gz - * - * Generated from protobuf field repeated string python_packages = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $python_packages; - /** - * Optional. Spark properties to provide configuration for use in sessions - * created for this environment. The properties to set on daemon config - * files. Property keys are specified in `prefix:property` format. The - * prefix must be "spark". - * - * Generated from protobuf field map properties = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $properties; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $image_version - * Required. Dataplex Image version. - * @type array|\Google\Protobuf\Internal\RepeatedField $java_libraries - * Optional. List of Java jars to be included in the runtime environment. - * Valid input includes Cloud Storage URIs to Jar binaries. - * For example, gs://bucket-name/my/path/to/file.jar - * @type array|\Google\Protobuf\Internal\RepeatedField $python_packages - * Optional. A list of python packages to be installed. - * Valid formats include Cloud Storage URI to a PIP installable library. - * For example, gs://bucket-name/my/path/to/lib.tar.gz - * @type array|\Google\Protobuf\Internal\MapField $properties - * Optional. Spark properties to provide configuration for use in sessions - * created for this environment. The properties to set on daemon config - * files. Property keys are specified in `prefix:property` format. The - * prefix must be "spark". - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Analyze::initOnce(); - parent::__construct($data); - } - - /** - * Required. Dataplex Image version. - * - * Generated from protobuf field string image_version = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getImageVersion() - { - return $this->image_version; - } - - /** - * Required. Dataplex Image version. - * - * Generated from protobuf field string image_version = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setImageVersion($var) - { - GPBUtil::checkString($var, True); - $this->image_version = $var; - - return $this; - } - - /** - * Optional. List of Java jars to be included in the runtime environment. - * Valid input includes Cloud Storage URIs to Jar binaries. - * For example, gs://bucket-name/my/path/to/file.jar - * - * Generated from protobuf field repeated string java_libraries = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getJavaLibraries() - { - return $this->java_libraries; - } - - /** - * Optional. List of Java jars to be included in the runtime environment. - * Valid input includes Cloud Storage URIs to Jar binaries. - * For example, gs://bucket-name/my/path/to/file.jar - * - * Generated from protobuf field repeated string java_libraries = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setJavaLibraries($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->java_libraries = $arr; - - return $this; - } - - /** - * Optional. A list of python packages to be installed. - * Valid formats include Cloud Storage URI to a PIP installable library. - * For example, gs://bucket-name/my/path/to/lib.tar.gz - * - * Generated from protobuf field repeated string python_packages = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPythonPackages() - { - return $this->python_packages; - } - - /** - * Optional. A list of python packages to be installed. - * Valid formats include Cloud Storage URI to a PIP installable library. - * For example, gs://bucket-name/my/path/to/lib.tar.gz - * - * Generated from protobuf field repeated string python_packages = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPythonPackages($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->python_packages = $arr; - - return $this; - } - - /** - * Optional. Spark properties to provide configuration for use in sessions - * created for this environment. The properties to set on daemon config - * files. Property keys are specified in `prefix:property` format. The - * prefix must be "spark". - * - * Generated from protobuf field map properties = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getProperties() - { - return $this->properties; - } - - /** - * Optional. Spark properties to provide configuration for use in sessions - * created for this environment. The properties to set on daemon config - * files. Property keys are specified in `prefix:property` format. The - * prefix must be "spark". - * - * Generated from protobuf field map properties = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setProperties($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->properties = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(OsImageRuntime::class, \Google\Cloud\Dataplex\V1\Environment_InfrastructureSpec_OsImageRuntime::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Environment/SessionSpec.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Environment/SessionSpec.php deleted file mode 100644 index 875f0566626c..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Environment/SessionSpec.php +++ /dev/null @@ -1,134 +0,0 @@ -google.cloud.dataplex.v1.Environment.SessionSpec - */ -class SessionSpec extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The idle time configuration of the session. The session will be - * auto-terminated at the end of this period. - * - * Generated from protobuf field .google.protobuf.Duration max_idle_duration = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $max_idle_duration = null; - /** - * Optional. If True, this causes sessions to be pre-created and available - * for faster startup to enable interactive exploration use-cases. This - * defaults to False to avoid additional billed charges. These can only be - * set to True for the environment with name set to "default", and with - * default configuration. - * - * Generated from protobuf field bool enable_fast_startup = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $enable_fast_startup = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Duration $max_idle_duration - * Optional. The idle time configuration of the session. The session will be - * auto-terminated at the end of this period. - * @type bool $enable_fast_startup - * Optional. If True, this causes sessions to be pre-created and available - * for faster startup to enable interactive exploration use-cases. This - * defaults to False to avoid additional billed charges. These can only be - * set to True for the environment with name set to "default", and with - * default configuration. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Analyze::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The idle time configuration of the session. The session will be - * auto-terminated at the end of this period. - * - * Generated from protobuf field .google.protobuf.Duration max_idle_duration = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Duration|null - */ - public function getMaxIdleDuration() - { - return $this->max_idle_duration; - } - - public function hasMaxIdleDuration() - { - return isset($this->max_idle_duration); - } - - public function clearMaxIdleDuration() - { - unset($this->max_idle_duration); - } - - /** - * Optional. The idle time configuration of the session. The session will be - * auto-terminated at the end of this period. - * - * Generated from protobuf field .google.protobuf.Duration max_idle_duration = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setMaxIdleDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->max_idle_duration = $var; - - return $this; - } - - /** - * Optional. If True, this causes sessions to be pre-created and available - * for faster startup to enable interactive exploration use-cases. This - * defaults to False to avoid additional billed charges. These can only be - * set to True for the environment with name set to "default", and with - * default configuration. - * - * Generated from protobuf field bool enable_fast_startup = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getEnableFastStartup() - { - return $this->enable_fast_startup; - } - - /** - * Optional. If True, this causes sessions to be pre-created and available - * for faster startup to enable interactive exploration use-cases. This - * defaults to False to avoid additional billed charges. These can only be - * set to True for the environment with name set to "default", and with - * default configuration. - * - * Generated from protobuf field bool enable_fast_startup = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setEnableFastStartup($var) - { - GPBUtil::checkBool($var); - $this->enable_fast_startup = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SessionSpec::class, \Google\Cloud\Dataplex\V1\Environment_SessionSpec::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Environment/SessionStatus.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Environment/SessionStatus.php deleted file mode 100644 index 9a9d1e9ac250..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Environment/SessionStatus.php +++ /dev/null @@ -1,74 +0,0 @@ -google.cloud.dataplex.v1.Environment.SessionStatus - */ -class SessionStatus extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Queries over sessions to mark whether the environment is - * currently active or not - * - * Generated from protobuf field bool active = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $active = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $active - * Output only. Queries over sessions to mark whether the environment is - * currently active or not - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Analyze::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Queries over sessions to mark whether the environment is - * currently active or not - * - * Generated from protobuf field bool active = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getActive() - { - return $this->active; - } - - /** - * Output only. Queries over sessions to mark whether the environment is - * currently active or not - * - * Generated from protobuf field bool active = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setActive($var) - { - GPBUtil::checkBool($var); - $this->active = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SessionStatus::class, \Google\Cloud\Dataplex\V1\Environment_SessionStatus::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GenerateDataQualityRulesRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GenerateDataQualityRulesRequest.php deleted file mode 100644 index 1d3444f890b8..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GenerateDataQualityRulesRequest.php +++ /dev/null @@ -1,95 +0,0 @@ -google.cloud.dataplex.v1.GenerateDataQualityRulesRequest - */ -class GenerateDataQualityRulesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name should be either - * * the name of a datascan with at least one successful completed data - * profiling job, or - * * the name of a successful completed data profiling datascan job. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - - /** - * @param string $name Required. The name should be either - * * the name of a datascan with at least one successful completed data - * profiling job, or - * * the name of a successful completed data profiling datascan job. - * - * @return \Google\Cloud\Dataplex\V1\GenerateDataQualityRulesRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name should be either - * * the name of a datascan with at least one successful completed data - * profiling job, or - * * the name of a successful completed data profiling datascan job. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Datascans::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name should be either - * * the name of a datascan with at least one successful completed data - * profiling job, or - * * the name of a successful completed data profiling datascan job. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name should be either - * * the name of a datascan with at least one successful completed data - * profiling job, or - * * the name of a successful completed data profiling datascan job. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GenerateDataQualityRulesResponse.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GenerateDataQualityRulesResponse.php deleted file mode 100644 index fa442d91bab0..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GenerateDataQualityRulesResponse.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.dataplex.v1.GenerateDataQualityRulesResponse - */ -class GenerateDataQualityRulesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Generated recommended {@link DataQualityRule}s. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataQualityRule rule = 1; - */ - private $rule; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Dataplex\V1\DataQualityRule>|\Google\Protobuf\Internal\RepeatedField $rule - * Generated recommended {@link DataQualityRule}s. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Datascans::initOnce(); - parent::__construct($data); - } - - /** - * Generated recommended {@link DataQualityRule}s. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataQualityRule rule = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRule() - { - return $this->rule; - } - - /** - * Generated recommended {@link DataQualityRule}s. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataQualityRule rule = 1; - * @param array<\Google\Cloud\Dataplex\V1\DataQualityRule>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRule($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\DataQualityRule::class); - $this->rule = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetAspectTypeRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetAspectTypeRequest.php deleted file mode 100644 index 9a15da81e83a..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetAspectTypeRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.dataplex.v1.GetAspectTypeRequest - */ -class GetAspectTypeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the AspectType: - * `projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The resource name of the AspectType: - * `projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}`. Please see - * {@see CatalogServiceClient::aspectTypeName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\GetAspectTypeRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the AspectType: - * `projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Catalog::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the AspectType: - * `projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the AspectType: - * `projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetAssetRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetAssetRequest.php deleted file mode 100644 index a130f8dfdf58..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetAssetRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.dataplex.v1.GetAssetRequest - */ -class GetAssetRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the asset: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The resource name of the asset: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. Please see - * {@see DataplexServiceClient::assetName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\GetAssetRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the asset: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the asset: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the asset: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetContentRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetContentRequest.php deleted file mode 100644 index f22038fef6a4..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetContentRequest.php +++ /dev/null @@ -1,120 +0,0 @@ -google.cloud.dataplex.v1.GetContentRequest - */ -class GetContentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the content: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. Specify content view to make a partial request. - * - * Generated from protobuf field .google.cloud.dataplex.v1.GetContentRequest.ContentView view = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $view = 0; - - /** - * @param string $name Required. The resource name of the content: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id} - * Please see {@see ContentServiceClient::contentName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\GetContentRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the content: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id} - * @type int $view - * Optional. Specify content view to make a partial request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Content::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the content: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the content: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. Specify content view to make a partial request. - * - * Generated from protobuf field .google.cloud.dataplex.v1.GetContentRequest.ContentView view = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getView() - { - return $this->view; - } - - /** - * Optional. Specify content view to make a partial request. - * - * Generated from protobuf field .google.cloud.dataplex.v1.GetContentRequest.ContentView view = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\GetContentRequest\ContentView::class); - $this->view = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetContentRequest/ContentView.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetContentRequest/ContentView.php deleted file mode 100644 index 4ac623081ebd..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetContentRequest/ContentView.php +++ /dev/null @@ -1,66 +0,0 @@ -google.cloud.dataplex.v1.GetContentRequest.ContentView - */ -class ContentView -{ - /** - * Content view not specified. Defaults to BASIC. - * The API will default to the BASIC view. - * - * Generated from protobuf enum CONTENT_VIEW_UNSPECIFIED = 0; - */ - const CONTENT_VIEW_UNSPECIFIED = 0; - /** - * Will not return the `data_text` field. - * - * Generated from protobuf enum BASIC = 1; - */ - const BASIC = 1; - /** - * Returns the complete proto. - * - * Generated from protobuf enum FULL = 2; - */ - const FULL = 2; - - private static $valueToName = [ - self::CONTENT_VIEW_UNSPECIFIED => 'CONTENT_VIEW_UNSPECIFIED', - self::BASIC => 'BASIC', - self::FULL => 'FULL', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ContentView::class, \Google\Cloud\Dataplex\V1\GetContentRequest_ContentView::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetDataAttributeBindingRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetDataAttributeBindingRequest.php deleted file mode 100644 index 9da780a77c99..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetDataAttributeBindingRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.dataplex.v1.GetDataAttributeBindingRequest - */ -class GetDataAttributeBindingRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the DataAttributeBinding: - * projects/{project_number}/locations/{location_id}/dataAttributeBindings/{data_attribute_binding_id} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The resource name of the DataAttributeBinding: - * projects/{project_number}/locations/{location_id}/dataAttributeBindings/{data_attribute_binding_id} - * Please see {@see DataTaxonomyServiceClient::dataAttributeBindingName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\GetDataAttributeBindingRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the DataAttributeBinding: - * projects/{project_number}/locations/{location_id}/dataAttributeBindings/{data_attribute_binding_id} - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataTaxonomy::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the DataAttributeBinding: - * projects/{project_number}/locations/{location_id}/dataAttributeBindings/{data_attribute_binding_id} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the DataAttributeBinding: - * projects/{project_number}/locations/{location_id}/dataAttributeBindings/{data_attribute_binding_id} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetDataAttributeRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetDataAttributeRequest.php deleted file mode 100644 index 9d7f615635de..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetDataAttributeRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.dataplex.v1.GetDataAttributeRequest - */ -class GetDataAttributeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the dataAttribute: - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The resource name of the dataAttribute: - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id} - * Please see {@see DataTaxonomyServiceClient::dataAttributeName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\GetDataAttributeRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the dataAttribute: - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id} - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataTaxonomy::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the dataAttribute: - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the dataAttribute: - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetDataScanJobRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetDataScanJobRequest.php deleted file mode 100644 index 6ae5f004f3c9..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetDataScanJobRequest.php +++ /dev/null @@ -1,130 +0,0 @@ -google.cloud.dataplex.v1.GetDataScanJobRequest - */ -class GetDataScanJobRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the DataScanJob: - * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}/jobs/{data_scan_job_id}` - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. Select the DataScanJob view to return. Defaults to `BASIC`. - * - * Generated from protobuf field .google.cloud.dataplex.v1.GetDataScanJobRequest.DataScanJobView view = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $view = 0; - - /** - * @param string $name Required. The resource name of the DataScanJob: - * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}/jobs/{data_scan_job_id}` - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. Please see - * {@see DataScanServiceClient::dataScanJobName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\GetDataScanJobRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the DataScanJob: - * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}/jobs/{data_scan_job_id}` - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * @type int $view - * Optional. Select the DataScanJob view to return. Defaults to `BASIC`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Datascans::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the DataScanJob: - * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}/jobs/{data_scan_job_id}` - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the DataScanJob: - * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}/jobs/{data_scan_job_id}` - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. Select the DataScanJob view to return. Defaults to `BASIC`. - * - * Generated from protobuf field .google.cloud.dataplex.v1.GetDataScanJobRequest.DataScanJobView view = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getView() - { - return $this->view; - } - - /** - * Optional. Select the DataScanJob view to return. Defaults to `BASIC`. - * - * Generated from protobuf field .google.cloud.dataplex.v1.GetDataScanJobRequest.DataScanJobView view = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\GetDataScanJobRequest\DataScanJobView::class); - $this->view = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetDataScanJobRequest/DataScanJobView.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetDataScanJobRequest/DataScanJobView.php deleted file mode 100644 index 456b7b16e7a4..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetDataScanJobRequest/DataScanJobView.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.dataplex.v1.GetDataScanJobRequest.DataScanJobView - */ -class DataScanJobView -{ - /** - * The API will default to the `BASIC` view. - * - * Generated from protobuf enum DATA_SCAN_JOB_VIEW_UNSPECIFIED = 0; - */ - const DATA_SCAN_JOB_VIEW_UNSPECIFIED = 0; - /** - * Basic view that does not include *spec* and *result*. - * - * Generated from protobuf enum BASIC = 1; - */ - const BASIC = 1; - /** - * Include everything. - * - * Generated from protobuf enum FULL = 10; - */ - const FULL = 10; - - private static $valueToName = [ - self::DATA_SCAN_JOB_VIEW_UNSPECIFIED => 'DATA_SCAN_JOB_VIEW_UNSPECIFIED', - self::BASIC => 'BASIC', - self::FULL => 'FULL', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DataScanJobView::class, \Google\Cloud\Dataplex\V1\GetDataScanJobRequest_DataScanJobView::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetDataScanRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetDataScanRequest.php deleted file mode 100644 index c3c75f71a955..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetDataScanRequest.php +++ /dev/null @@ -1,130 +0,0 @@ -google.cloud.dataplex.v1.GetDataScanRequest - */ -class GetDataScanRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the dataScan: - * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. Select the DataScan view to return. Defaults to `BASIC`. - * - * Generated from protobuf field .google.cloud.dataplex.v1.GetDataScanRequest.DataScanView view = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $view = 0; - - /** - * @param string $name Required. The resource name of the dataScan: - * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. Please see - * {@see DataScanServiceClient::dataScanName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\GetDataScanRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the dataScan: - * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * @type int $view - * Optional. Select the DataScan view to return. Defaults to `BASIC`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Datascans::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the dataScan: - * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the dataScan: - * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. Select the DataScan view to return. Defaults to `BASIC`. - * - * Generated from protobuf field .google.cloud.dataplex.v1.GetDataScanRequest.DataScanView view = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getView() - { - return $this->view; - } - - /** - * Optional. Select the DataScan view to return. Defaults to `BASIC`. - * - * Generated from protobuf field .google.cloud.dataplex.v1.GetDataScanRequest.DataScanView view = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\GetDataScanRequest\DataScanView::class); - $this->view = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetDataScanRequest/DataScanView.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetDataScanRequest/DataScanView.php deleted file mode 100644 index 2f5e406bef81..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetDataScanRequest/DataScanView.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.dataplex.v1.GetDataScanRequest.DataScanView - */ -class DataScanView -{ - /** - * The API will default to the `BASIC` view. - * - * Generated from protobuf enum DATA_SCAN_VIEW_UNSPECIFIED = 0; - */ - const DATA_SCAN_VIEW_UNSPECIFIED = 0; - /** - * Basic view that does not include *spec* and *result*. - * - * Generated from protobuf enum BASIC = 1; - */ - const BASIC = 1; - /** - * Include everything. - * - * Generated from protobuf enum FULL = 10; - */ - const FULL = 10; - - private static $valueToName = [ - self::DATA_SCAN_VIEW_UNSPECIFIED => 'DATA_SCAN_VIEW_UNSPECIFIED', - self::BASIC => 'BASIC', - self::FULL => 'FULL', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DataScanView::class, \Google\Cloud\Dataplex\V1\GetDataScanRequest_DataScanView::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetDataTaxonomyRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetDataTaxonomyRequest.php deleted file mode 100644 index 08d9be6edded..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetDataTaxonomyRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.dataplex.v1.GetDataTaxonomyRequest - */ -class GetDataTaxonomyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the DataTaxonomy: - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The resource name of the DataTaxonomy: - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} - * Please see {@see DataTaxonomyServiceClient::dataTaxonomyName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\GetDataTaxonomyRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the DataTaxonomy: - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataTaxonomy::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the DataTaxonomy: - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the DataTaxonomy: - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetEntityRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetEntityRequest.php deleted file mode 100644 index ea9917eb51b9..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetEntityRequest.php +++ /dev/null @@ -1,124 +0,0 @@ -google.cloud.dataplex.v1.GetEntityRequest - */ -class GetEntityRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the entity: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}.` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. Used to select the subset of entity information to return. - * Defaults to `BASIC`. - * - * Generated from protobuf field .google.cloud.dataplex.v1.GetEntityRequest.EntityView view = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $view = 0; - - /** - * @param string $name Required. The resource name of the entity: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}.` - * Please see {@see MetadataServiceClient::entityName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\GetEntityRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the entity: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}.` - * @type int $view - * Optional. Used to select the subset of entity information to return. - * Defaults to `BASIC`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Metadata::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the entity: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}.` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the entity: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}.` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. Used to select the subset of entity information to return. - * Defaults to `BASIC`. - * - * Generated from protobuf field .google.cloud.dataplex.v1.GetEntityRequest.EntityView view = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getView() - { - return $this->view; - } - - /** - * Optional. Used to select the subset of entity information to return. - * Defaults to `BASIC`. - * - * Generated from protobuf field .google.cloud.dataplex.v1.GetEntityRequest.EntityView view = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\GetEntityRequest\EntityView::class); - $this->view = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetEntityRequest/EntityView.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetEntityRequest/EntityView.php deleted file mode 100644 index ad4952b5751c..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetEntityRequest/EntityView.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.dataplex.v1.GetEntityRequest.EntityView - */ -class EntityView -{ - /** - * The API will default to the `BASIC` view. - * - * Generated from protobuf enum ENTITY_VIEW_UNSPECIFIED = 0; - */ - const ENTITY_VIEW_UNSPECIFIED = 0; - /** - * Minimal view that does not include the schema. - * - * Generated from protobuf enum BASIC = 1; - */ - const BASIC = 1; - /** - * Include basic information and schema. - * - * Generated from protobuf enum SCHEMA = 2; - */ - const SCHEMA = 2; - /** - * Include everything. Currently, this is the same as the SCHEMA view. - * - * Generated from protobuf enum FULL = 4; - */ - const FULL = 4; - - private static $valueToName = [ - self::ENTITY_VIEW_UNSPECIFIED => 'ENTITY_VIEW_UNSPECIFIED', - self::BASIC => 'BASIC', - self::SCHEMA => 'SCHEMA', - self::FULL => 'FULL', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(EntityView::class, \Google\Cloud\Dataplex\V1\GetEntityRequest_EntityView::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetEntryGroupRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetEntryGroupRequest.php deleted file mode 100644 index 282518503945..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetEntryGroupRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.dataplex.v1.GetEntryGroupRequest - */ -class GetEntryGroupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the EntryGroup: - * `projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The resource name of the EntryGroup: - * `projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}`. Please see - * {@see CatalogServiceClient::entryGroupName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\GetEntryGroupRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the EntryGroup: - * `projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Catalog::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the EntryGroup: - * `projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the EntryGroup: - * `projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetEntryRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetEntryRequest.php deleted file mode 100644 index 49581bf69832..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetEntryRequest.php +++ /dev/null @@ -1,194 +0,0 @@ -google.cloud.dataplex.v1.GetEntryRequest - */ -class GetEntryRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the Entry: - * `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. View for controlling which parts of an entry are to be returned. - * - * Generated from protobuf field .google.cloud.dataplex.v1.EntryView view = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $view = 0; - /** - * Optional. Limits the aspects returned to the provided aspect types. - * Only works if the CUSTOM view is selected. - * - * Generated from protobuf field repeated string aspect_types = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $aspect_types; - /** - * Optional. Limits the aspects returned to those associated with the provided - * paths within the Entry. Only works if the CUSTOM view is selected. - * - * Generated from protobuf field repeated string paths = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $paths; - - /** - * @param string $name Required. The resource name of the Entry: - * `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. Please see - * {@see CatalogServiceClient::entryName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\GetEntryRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the Entry: - * `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. - * @type int $view - * Optional. View for controlling which parts of an entry are to be returned. - * @type array|\Google\Protobuf\Internal\RepeatedField $aspect_types - * Optional. Limits the aspects returned to the provided aspect types. - * Only works if the CUSTOM view is selected. - * @type array|\Google\Protobuf\Internal\RepeatedField $paths - * Optional. Limits the aspects returned to those associated with the provided - * paths within the Entry. Only works if the CUSTOM view is selected. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Catalog::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the Entry: - * `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the Entry: - * `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. View for controlling which parts of an entry are to be returned. - * - * Generated from protobuf field .google.cloud.dataplex.v1.EntryView view = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getView() - { - return $this->view; - } - - /** - * Optional. View for controlling which parts of an entry are to be returned. - * - * Generated from protobuf field .google.cloud.dataplex.v1.EntryView view = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\EntryView::class); - $this->view = $var; - - return $this; - } - - /** - * Optional. Limits the aspects returned to the provided aspect types. - * Only works if the CUSTOM view is selected. - * - * Generated from protobuf field repeated string aspect_types = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAspectTypes() - { - return $this->aspect_types; - } - - /** - * Optional. Limits the aspects returned to the provided aspect types. - * Only works if the CUSTOM view is selected. - * - * Generated from protobuf field repeated string aspect_types = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAspectTypes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->aspect_types = $arr; - - return $this; - } - - /** - * Optional. Limits the aspects returned to those associated with the provided - * paths within the Entry. Only works if the CUSTOM view is selected. - * - * Generated from protobuf field repeated string paths = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPaths() - { - return $this->paths; - } - - /** - * Optional. Limits the aspects returned to those associated with the provided - * paths within the Entry. Only works if the CUSTOM view is selected. - * - * Generated from protobuf field repeated string paths = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPaths($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->paths = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetEntryTypeRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetEntryTypeRequest.php deleted file mode 100644 index 93096ecfa34b..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetEntryTypeRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.dataplex.v1.GetEntryTypeRequest - */ -class GetEntryTypeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the EntryType: - * `projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The resource name of the EntryType: - * `projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}`. Please see - * {@see CatalogServiceClient::entryTypeName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\GetEntryTypeRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the EntryType: - * `projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Catalog::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the EntryType: - * `projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the EntryType: - * `projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetEnvironmentRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetEnvironmentRequest.php deleted file mode 100644 index ac5c5f444540..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetEnvironmentRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.dataplex.v1.GetEnvironmentRequest - */ -class GetEnvironmentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the environment: - * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The resource name of the environment: - * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`. Please see - * {@see DataplexServiceClient::environmentName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\GetEnvironmentRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the environment: - * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the environment: - * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the environment: - * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetJobRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetJobRequest.php deleted file mode 100644 index bd2193f0bdc7..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetJobRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.dataplex.v1.GetJobRequest - */ -class GetJobRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the job: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}/jobs/{job_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The resource name of the job: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}/jobs/{job_id}`. Please see - * {@see DataplexServiceClient::jobName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\GetJobRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the job: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}/jobs/{job_id}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the job: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}/jobs/{job_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the job: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}/jobs/{job_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetLakeRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetLakeRequest.php deleted file mode 100644 index 0258ba185430..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetLakeRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.dataplex.v1.GetLakeRequest - */ -class GetLakeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The resource name of the lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. Please see - * {@see DataplexServiceClient::lakeName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\GetLakeRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetPartitionRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetPartitionRequest.php deleted file mode 100644 index 43b96cbd181b..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetPartitionRequest.php +++ /dev/null @@ -1,96 +0,0 @@ -google.cloud.dataplex.v1.GetPartitionRequest - */ -class GetPartitionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the partition: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_value_path}`. - * The {partition_value_path} segment consists of an ordered sequence of - * partition values separated by "/". All values must be provided. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The resource name of the partition: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_value_path}`. - * The {partition_value_path} segment consists of an ordered sequence of - * partition values separated by "/". All values must be provided. Please see - * {@see MetadataServiceClient::partitionName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\GetPartitionRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the partition: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_value_path}`. - * The {partition_value_path} segment consists of an ordered sequence of - * partition values separated by "/". All values must be provided. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Metadata::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the partition: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_value_path}`. - * The {partition_value_path} segment consists of an ordered sequence of - * partition values separated by "/". All values must be provided. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the partition: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_value_path}`. - * The {partition_value_path} segment consists of an ordered sequence of - * partition values separated by "/". All values must be provided. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetTaskRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetTaskRequest.php deleted file mode 100644 index 47d121f37e2d..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetTaskRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.dataplex.v1.GetTaskRequest - */ -class GetTaskRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the task: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{tasks_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The resource name of the task: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{tasks_id}`. Please see - * {@see DataplexServiceClient::taskName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\GetTaskRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the task: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{tasks_id}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the task: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{tasks_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the task: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{tasks_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetZoneRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetZoneRequest.php deleted file mode 100644 index 916e309dabbe..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GetZoneRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.dataplex.v1.GetZoneRequest - */ -class GetZoneRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The resource name of the zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. Please see - * {@see DataplexServiceClient::zoneName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\GetZoneRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GovernanceEvent.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GovernanceEvent.php deleted file mode 100644 index 62efaeb04fad..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GovernanceEvent.php +++ /dev/null @@ -1,149 +0,0 @@ -google.cloud.dataplex.v1.GovernanceEvent - */ -class GovernanceEvent extends \Google\Protobuf\Internal\Message -{ - /** - * The log message. - * - * Generated from protobuf field string message = 1; - */ - protected $message = ''; - /** - * The type of the event. - * - * Generated from protobuf field .google.cloud.dataplex.v1.GovernanceEvent.EventType event_type = 2; - */ - protected $event_type = 0; - /** - * Entity resource information if the log event is associated with a - * specific entity. - * - * Generated from protobuf field optional .google.cloud.dataplex.v1.GovernanceEvent.Entity entity = 3; - */ - protected $entity = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $message - * The log message. - * @type int $event_type - * The type of the event. - * @type \Google\Cloud\Dataplex\V1\GovernanceEvent\Entity $entity - * Entity resource information if the log event is associated with a - * specific entity. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Logs::initOnce(); - parent::__construct($data); - } - - /** - * The log message. - * - * Generated from protobuf field string message = 1; - * @return string - */ - public function getMessage() - { - return $this->message; - } - - /** - * The log message. - * - * Generated from protobuf field string message = 1; - * @param string $var - * @return $this - */ - public function setMessage($var) - { - GPBUtil::checkString($var, True); - $this->message = $var; - - return $this; - } - - /** - * The type of the event. - * - * Generated from protobuf field .google.cloud.dataplex.v1.GovernanceEvent.EventType event_type = 2; - * @return int - */ - public function getEventType() - { - return $this->event_type; - } - - /** - * The type of the event. - * - * Generated from protobuf field .google.cloud.dataplex.v1.GovernanceEvent.EventType event_type = 2; - * @param int $var - * @return $this - */ - public function setEventType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\GovernanceEvent\EventType::class); - $this->event_type = $var; - - return $this; - } - - /** - * Entity resource information if the log event is associated with a - * specific entity. - * - * Generated from protobuf field optional .google.cloud.dataplex.v1.GovernanceEvent.Entity entity = 3; - * @return \Google\Cloud\Dataplex\V1\GovernanceEvent\Entity|null - */ - public function getEntity() - { - return $this->entity; - } - - public function hasEntity() - { - return isset($this->entity); - } - - public function clearEntity() - { - unset($this->entity); - } - - /** - * Entity resource information if the log event is associated with a - * specific entity. - * - * Generated from protobuf field optional .google.cloud.dataplex.v1.GovernanceEvent.Entity entity = 3; - * @param \Google\Cloud\Dataplex\V1\GovernanceEvent\Entity $var - * @return $this - */ - public function setEntity($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\GovernanceEvent\Entity::class); - $this->entity = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GovernanceEvent/Entity.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GovernanceEvent/Entity.php deleted file mode 100644 index 267d96437943..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GovernanceEvent/Entity.php +++ /dev/null @@ -1,112 +0,0 @@ -google.cloud.dataplex.v1.GovernanceEvent.Entity - */ -class Entity extends \Google\Protobuf\Internal\Message -{ - /** - * The Entity resource the log event is associated with. - * Format: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}` - * - * Generated from protobuf field string entity = 1 [(.google.api.resource_reference) = { - */ - protected $entity = ''; - /** - * Type of entity. - * - * Generated from protobuf field .google.cloud.dataplex.v1.GovernanceEvent.Entity.EntityType entity_type = 2; - */ - protected $entity_type = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $entity - * The Entity resource the log event is associated with. - * Format: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}` - * @type int $entity_type - * Type of entity. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Logs::initOnce(); - parent::__construct($data); - } - - /** - * The Entity resource the log event is associated with. - * Format: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}` - * - * Generated from protobuf field string entity = 1 [(.google.api.resource_reference) = { - * @return string - */ - public function getEntity() - { - return $this->entity; - } - - /** - * The Entity resource the log event is associated with. - * Format: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}` - * - * Generated from protobuf field string entity = 1 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setEntity($var) - { - GPBUtil::checkString($var, True); - $this->entity = $var; - - return $this; - } - - /** - * Type of entity. - * - * Generated from protobuf field .google.cloud.dataplex.v1.GovernanceEvent.Entity.EntityType entity_type = 2; - * @return int - */ - public function getEntityType() - { - return $this->entity_type; - } - - /** - * Type of entity. - * - * Generated from protobuf field .google.cloud.dataplex.v1.GovernanceEvent.Entity.EntityType entity_type = 2; - * @param int $var - * @return $this - */ - public function setEntityType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\GovernanceEvent\Entity\EntityType::class); - $this->entity_type = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Entity::class, \Google\Cloud\Dataplex\V1\GovernanceEvent_Entity::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GovernanceEvent/Entity/EntityType.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GovernanceEvent/Entity/EntityType.php deleted file mode 100644 index a41babd15894..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GovernanceEvent/Entity/EntityType.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.dataplex.v1.GovernanceEvent.Entity.EntityType - */ -class EntityType -{ - /** - * An unspecified Entity type. - * - * Generated from protobuf enum ENTITY_TYPE_UNSPECIFIED = 0; - */ - const ENTITY_TYPE_UNSPECIFIED = 0; - /** - * Table entity type. - * - * Generated from protobuf enum TABLE = 1; - */ - const TABLE = 1; - /** - * Fileset entity type. - * - * Generated from protobuf enum FILESET = 2; - */ - const FILESET = 2; - - private static $valueToName = [ - self::ENTITY_TYPE_UNSPECIFIED => 'ENTITY_TYPE_UNSPECIFIED', - self::TABLE => 'TABLE', - self::FILESET => 'FILESET', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(EntityType::class, \Google\Cloud\Dataplex\V1\GovernanceEvent_Entity_EntityType::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GovernanceEvent/EventType.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GovernanceEvent/EventType.php deleted file mode 100644 index c267ccfa295c..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/GovernanceEvent/EventType.php +++ /dev/null @@ -1,162 +0,0 @@ -google.cloud.dataplex.v1.GovernanceEvent.EventType - */ -class EventType -{ - /** - * An unspecified event type. - * - * Generated from protobuf enum EVENT_TYPE_UNSPECIFIED = 0; - */ - const EVENT_TYPE_UNSPECIFIED = 0; - /** - * Resource IAM policy update event. - * - * Generated from protobuf enum RESOURCE_IAM_POLICY_UPDATE = 1; - */ - const RESOURCE_IAM_POLICY_UPDATE = 1; - /** - * BigQuery table create event. - * - * Generated from protobuf enum BIGQUERY_TABLE_CREATE = 2; - */ - const BIGQUERY_TABLE_CREATE = 2; - /** - * BigQuery table update event. - * - * Generated from protobuf enum BIGQUERY_TABLE_UPDATE = 3; - */ - const BIGQUERY_TABLE_UPDATE = 3; - /** - * BigQuery table delete event. - * - * Generated from protobuf enum BIGQUERY_TABLE_DELETE = 4; - */ - const BIGQUERY_TABLE_DELETE = 4; - /** - * BigQuery connection create event. - * - * Generated from protobuf enum BIGQUERY_CONNECTION_CREATE = 5; - */ - const BIGQUERY_CONNECTION_CREATE = 5; - /** - * BigQuery connection update event. - * - * Generated from protobuf enum BIGQUERY_CONNECTION_UPDATE = 6; - */ - const BIGQUERY_CONNECTION_UPDATE = 6; - /** - * BigQuery connection delete event. - * - * Generated from protobuf enum BIGQUERY_CONNECTION_DELETE = 7; - */ - const BIGQUERY_CONNECTION_DELETE = 7; - /** - * BigQuery taxonomy created. - * - * Generated from protobuf enum BIGQUERY_TAXONOMY_CREATE = 10; - */ - const BIGQUERY_TAXONOMY_CREATE = 10; - /** - * BigQuery policy tag created. - * - * Generated from protobuf enum BIGQUERY_POLICY_TAG_CREATE = 11; - */ - const BIGQUERY_POLICY_TAG_CREATE = 11; - /** - * BigQuery policy tag deleted. - * - * Generated from protobuf enum BIGQUERY_POLICY_TAG_DELETE = 12; - */ - const BIGQUERY_POLICY_TAG_DELETE = 12; - /** - * BigQuery set iam policy for policy tag. - * - * Generated from protobuf enum BIGQUERY_POLICY_TAG_SET_IAM_POLICY = 13; - */ - const BIGQUERY_POLICY_TAG_SET_IAM_POLICY = 13; - /** - * Access policy update event. - * - * Generated from protobuf enum ACCESS_POLICY_UPDATE = 14; - */ - const ACCESS_POLICY_UPDATE = 14; - /** - * Number of resources matched with particular Query. - * - * Generated from protobuf enum GOVERNANCE_RULE_MATCHED_RESOURCES = 15; - */ - const GOVERNANCE_RULE_MATCHED_RESOURCES = 15; - /** - * Rule processing exceeds the allowed limit. - * - * Generated from protobuf enum GOVERNANCE_RULE_SEARCH_LIMIT_EXCEEDS = 16; - */ - const GOVERNANCE_RULE_SEARCH_LIMIT_EXCEEDS = 16; - /** - * Rule processing errors. - * - * Generated from protobuf enum GOVERNANCE_RULE_ERRORS = 17; - */ - const GOVERNANCE_RULE_ERRORS = 17; - /** - * Governance rule processing Event. - * - * Generated from protobuf enum GOVERNANCE_RULE_PROCESSING = 18; - */ - const GOVERNANCE_RULE_PROCESSING = 18; - - private static $valueToName = [ - self::EVENT_TYPE_UNSPECIFIED => 'EVENT_TYPE_UNSPECIFIED', - self::RESOURCE_IAM_POLICY_UPDATE => 'RESOURCE_IAM_POLICY_UPDATE', - self::BIGQUERY_TABLE_CREATE => 'BIGQUERY_TABLE_CREATE', - self::BIGQUERY_TABLE_UPDATE => 'BIGQUERY_TABLE_UPDATE', - self::BIGQUERY_TABLE_DELETE => 'BIGQUERY_TABLE_DELETE', - self::BIGQUERY_CONNECTION_CREATE => 'BIGQUERY_CONNECTION_CREATE', - self::BIGQUERY_CONNECTION_UPDATE => 'BIGQUERY_CONNECTION_UPDATE', - self::BIGQUERY_CONNECTION_DELETE => 'BIGQUERY_CONNECTION_DELETE', - self::BIGQUERY_TAXONOMY_CREATE => 'BIGQUERY_TAXONOMY_CREATE', - self::BIGQUERY_POLICY_TAG_CREATE => 'BIGQUERY_POLICY_TAG_CREATE', - self::BIGQUERY_POLICY_TAG_DELETE => 'BIGQUERY_POLICY_TAG_DELETE', - self::BIGQUERY_POLICY_TAG_SET_IAM_POLICY => 'BIGQUERY_POLICY_TAG_SET_IAM_POLICY', - self::ACCESS_POLICY_UPDATE => 'ACCESS_POLICY_UPDATE', - self::GOVERNANCE_RULE_MATCHED_RESOURCES => 'GOVERNANCE_RULE_MATCHED_RESOURCES', - self::GOVERNANCE_RULE_SEARCH_LIMIT_EXCEEDS => 'GOVERNANCE_RULE_SEARCH_LIMIT_EXCEEDS', - self::GOVERNANCE_RULE_ERRORS => 'GOVERNANCE_RULE_ERRORS', - self::GOVERNANCE_RULE_PROCESSING => 'GOVERNANCE_RULE_PROCESSING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(EventType::class, \Google\Cloud\Dataplex\V1\GovernanceEvent_EventType::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Job.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Job.php deleted file mode 100644 index d01c70cc3595..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Job.php +++ /dev/null @@ -1,483 +0,0 @@ -google.cloud.dataplex.v1.Job - */ -class Job extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The relative resource name of the job, of the form: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}/jobs/{job_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Output only. System generated globally unique ID for the job. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - /** - * Output only. The time when the job was started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $start_time = null; - /** - * Output only. The time when the job ended. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $end_time = null; - /** - * Output only. Execution state for the job. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Job.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. The number of times the job has been retried (excluding the - * initial attempt). - * - * Generated from protobuf field uint32 retry_count = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $retry_count = 0; - /** - * Output only. The underlying service running a job. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Job.Service service = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $service = 0; - /** - * Output only. The full resource name for the job run under a particular - * service. - * - * Generated from protobuf field string service_job = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $service_job = ''; - /** - * Output only. Additional information about the current state. - * - * Generated from protobuf field string message = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $message = ''; - /** - * Output only. User-defined labels for the task. - * - * Generated from protobuf field map labels = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $labels; - /** - * Output only. Job execution trigger. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Job.Trigger trigger = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $trigger = 0; - /** - * Output only. Spec related to how a task is executed. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Task.ExecutionSpec execution_spec = 100 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $execution_spec = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The relative resource name of the job, of the form: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}/jobs/{job_id}`. - * @type string $uid - * Output only. System generated globally unique ID for the job. - * @type \Google\Protobuf\Timestamp $start_time - * Output only. The time when the job was started. - * @type \Google\Protobuf\Timestamp $end_time - * Output only. The time when the job ended. - * @type int $state - * Output only. Execution state for the job. - * @type int $retry_count - * Output only. The number of times the job has been retried (excluding the - * initial attempt). - * @type int $service - * Output only. The underlying service running a job. - * @type string $service_job - * Output only. The full resource name for the job run under a particular - * service. - * @type string $message - * Output only. Additional information about the current state. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Output only. User-defined labels for the task. - * @type int $trigger - * Output only. Job execution trigger. - * @type \Google\Cloud\Dataplex\V1\Task\ExecutionSpec $execution_spec - * Output only. Spec related to how a task is executed. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Tasks::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The relative resource name of the job, of the form: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}/jobs/{job_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The relative resource name of the job, of the form: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}/jobs/{job_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. System generated globally unique ID for the job. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. System generated globally unique ID for the job. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - - /** - * Output only. The time when the job was started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStartTime() - { - return $this->start_time; - } - - public function hasStartTime() - { - return isset($this->start_time); - } - - public function clearStartTime() - { - unset($this->start_time); - } - - /** - * Output only. The time when the job was started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * Output only. The time when the job ended. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * Output only. The time when the job ended. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * Output only. Execution state for the job. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Job.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. Execution state for the job. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Job.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\Job\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. The number of times the job has been retried (excluding the - * initial attempt). - * - * Generated from protobuf field uint32 retry_count = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getRetryCount() - { - return $this->retry_count; - } - - /** - * Output only. The number of times the job has been retried (excluding the - * initial attempt). - * - * Generated from protobuf field uint32 retry_count = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setRetryCount($var) - { - GPBUtil::checkUint32($var); - $this->retry_count = $var; - - return $this; - } - - /** - * Output only. The underlying service running a job. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Job.Service service = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getService() - { - return $this->service; - } - - /** - * Output only. The underlying service running a job. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Job.Service service = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setService($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\Job\Service::class); - $this->service = $var; - - return $this; - } - - /** - * Output only. The full resource name for the job run under a particular - * service. - * - * Generated from protobuf field string service_job = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getServiceJob() - { - return $this->service_job; - } - - /** - * Output only. The full resource name for the job run under a particular - * service. - * - * Generated from protobuf field string service_job = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setServiceJob($var) - { - GPBUtil::checkString($var, True); - $this->service_job = $var; - - return $this; - } - - /** - * Output only. Additional information about the current state. - * - * Generated from protobuf field string message = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getMessage() - { - return $this->message; - } - - /** - * Output only. Additional information about the current state. - * - * Generated from protobuf field string message = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setMessage($var) - { - GPBUtil::checkString($var, True); - $this->message = $var; - - return $this; - } - - /** - * Output only. User-defined labels for the task. - * - * Generated from protobuf field map labels = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Output only. User-defined labels for the task. - * - * Generated from protobuf field map labels = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Output only. Job execution trigger. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Job.Trigger trigger = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getTrigger() - { - return $this->trigger; - } - - /** - * Output only. Job execution trigger. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Job.Trigger trigger = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setTrigger($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\Job\Trigger::class); - $this->trigger = $var; - - return $this; - } - - /** - * Output only. Spec related to how a task is executed. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Task.ExecutionSpec execution_spec = 100 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Dataplex\V1\Task\ExecutionSpec|null - */ - public function getExecutionSpec() - { - return $this->execution_spec; - } - - public function hasExecutionSpec() - { - return isset($this->execution_spec); - } - - public function clearExecutionSpec() - { - unset($this->execution_spec); - } - - /** - * Output only. Spec related to how a task is executed. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Task.ExecutionSpec execution_spec = 100 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Dataplex\V1\Task\ExecutionSpec $var - * @return $this - */ - public function setExecutionSpec($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Task\ExecutionSpec::class); - $this->execution_spec = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Job/Service.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Job/Service.php deleted file mode 100644 index 08e0a6e08b68..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Job/Service.php +++ /dev/null @@ -1,55 +0,0 @@ -google.cloud.dataplex.v1.Job.Service - */ -class Service -{ - /** - * Service used to run the job is unspecified. - * - * Generated from protobuf enum SERVICE_UNSPECIFIED = 0; - */ - const SERVICE_UNSPECIFIED = 0; - /** - * Dataproc service is used to run this job. - * - * Generated from protobuf enum DATAPROC = 1; - */ - const DATAPROC = 1; - - private static $valueToName = [ - self::SERVICE_UNSPECIFIED => 'SERVICE_UNSPECIFIED', - self::DATAPROC => 'DATAPROC', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Service::class, \Google\Cloud\Dataplex\V1\Job_Service::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Job/State.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Job/State.php deleted file mode 100644 index 52ab56038e03..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Job/State.php +++ /dev/null @@ -1,90 +0,0 @@ -google.cloud.dataplex.v1.Job.State - */ -class State -{ - /** - * The job state is unknown. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The job is running. - * - * Generated from protobuf enum RUNNING = 1; - */ - const RUNNING = 1; - /** - * The job is cancelling. - * - * Generated from protobuf enum CANCELLING = 2; - */ - const CANCELLING = 2; - /** - * The job cancellation was successful. - * - * Generated from protobuf enum CANCELLED = 3; - */ - const CANCELLED = 3; - /** - * The job completed successfully. - * - * Generated from protobuf enum SUCCEEDED = 4; - */ - const SUCCEEDED = 4; - /** - * The job is no longer running due to an error. - * - * Generated from protobuf enum FAILED = 5; - */ - const FAILED = 5; - /** - * The job was cancelled outside of Dataplex. - * - * Generated from protobuf enum ABORTED = 6; - */ - const ABORTED = 6; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::RUNNING => 'RUNNING', - self::CANCELLING => 'CANCELLING', - self::CANCELLED => 'CANCELLED', - self::SUCCEEDED => 'SUCCEEDED', - self::FAILED => 'FAILED', - self::ABORTED => 'ABORTED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\Dataplex\V1\Job_State::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Job/Trigger.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Job/Trigger.php deleted file mode 100644 index 9a1d83d03c54..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Job/Trigger.php +++ /dev/null @@ -1,65 +0,0 @@ -google.cloud.dataplex.v1.Job.Trigger - */ -class Trigger -{ - /** - * The trigger is unspecified. - * - * Generated from protobuf enum TRIGGER_UNSPECIFIED = 0; - */ - const TRIGGER_UNSPECIFIED = 0; - /** - * The job was triggered by Dataplex based on trigger spec from task - * definition. - * - * Generated from protobuf enum TASK_CONFIG = 1; - */ - const TASK_CONFIG = 1; - /** - * The job was triggered by the explicit call of Task API. - * - * Generated from protobuf enum RUN_REQUEST = 2; - */ - const RUN_REQUEST = 2; - - private static $valueToName = [ - self::TRIGGER_UNSPECIFIED => 'TRIGGER_UNSPECIFIED', - self::TASK_CONFIG => 'TASK_CONFIG', - self::RUN_REQUEST => 'RUN_REQUEST', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Trigger::class, \Google\Cloud\Dataplex\V1\Job_Trigger::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/JobEvent.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/JobEvent.php deleted file mode 100644 index 63a1762204e0..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/JobEvent.php +++ /dev/null @@ -1,394 +0,0 @@ -google.cloud.dataplex.v1.JobEvent - */ -class JobEvent extends \Google\Protobuf\Internal\Message -{ - /** - * The log message. - * - * Generated from protobuf field string message = 1; - */ - protected $message = ''; - /** - * The unique id identifying the job. - * - * Generated from protobuf field string job_id = 2; - */ - protected $job_id = ''; - /** - * The time when the job started running. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 3; - */ - protected $start_time = null; - /** - * The time when the job ended running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 4; - */ - protected $end_time = null; - /** - * The job state on completion. - * - * Generated from protobuf field .google.cloud.dataplex.v1.JobEvent.State state = 5; - */ - protected $state = 0; - /** - * The number of retries. - * - * Generated from protobuf field int32 retries = 6; - */ - protected $retries = 0; - /** - * The type of the job. - * - * Generated from protobuf field .google.cloud.dataplex.v1.JobEvent.Type type = 7; - */ - protected $type = 0; - /** - * The service used to execute the job. - * - * Generated from protobuf field .google.cloud.dataplex.v1.JobEvent.Service service = 8; - */ - protected $service = 0; - /** - * The reference to the job within the service. - * - * Generated from protobuf field string service_job = 9; - */ - protected $service_job = ''; - /** - * Job execution trigger. - * - * Generated from protobuf field .google.cloud.dataplex.v1.JobEvent.ExecutionTrigger execution_trigger = 11; - */ - protected $execution_trigger = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $message - * The log message. - * @type string $job_id - * The unique id identifying the job. - * @type \Google\Protobuf\Timestamp $start_time - * The time when the job started running. - * @type \Google\Protobuf\Timestamp $end_time - * The time when the job ended running. - * @type int $state - * The job state on completion. - * @type int $retries - * The number of retries. - * @type int $type - * The type of the job. - * @type int $service - * The service used to execute the job. - * @type string $service_job - * The reference to the job within the service. - * @type int $execution_trigger - * Job execution trigger. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Logs::initOnce(); - parent::__construct($data); - } - - /** - * The log message. - * - * Generated from protobuf field string message = 1; - * @return string - */ - public function getMessage() - { - return $this->message; - } - - /** - * The log message. - * - * Generated from protobuf field string message = 1; - * @param string $var - * @return $this - */ - public function setMessage($var) - { - GPBUtil::checkString($var, True); - $this->message = $var; - - return $this; - } - - /** - * The unique id identifying the job. - * - * Generated from protobuf field string job_id = 2; - * @return string - */ - public function getJobId() - { - return $this->job_id; - } - - /** - * The unique id identifying the job. - * - * Generated from protobuf field string job_id = 2; - * @param string $var - * @return $this - */ - public function setJobId($var) - { - GPBUtil::checkString($var, True); - $this->job_id = $var; - - return $this; - } - - /** - * The time when the job started running. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 3; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStartTime() - { - return $this->start_time; - } - - public function hasStartTime() - { - return isset($this->start_time); - } - - public function clearStartTime() - { - unset($this->start_time); - } - - /** - * The time when the job started running. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * The time when the job ended running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 4; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * The time when the job ended running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * The job state on completion. - * - * Generated from protobuf field .google.cloud.dataplex.v1.JobEvent.State state = 5; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * The job state on completion. - * - * Generated from protobuf field .google.cloud.dataplex.v1.JobEvent.State state = 5; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\JobEvent\State::class); - $this->state = $var; - - return $this; - } - - /** - * The number of retries. - * - * Generated from protobuf field int32 retries = 6; - * @return int - */ - public function getRetries() - { - return $this->retries; - } - - /** - * The number of retries. - * - * Generated from protobuf field int32 retries = 6; - * @param int $var - * @return $this - */ - public function setRetries($var) - { - GPBUtil::checkInt32($var); - $this->retries = $var; - - return $this; - } - - /** - * The type of the job. - * - * Generated from protobuf field .google.cloud.dataplex.v1.JobEvent.Type type = 7; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * The type of the job. - * - * Generated from protobuf field .google.cloud.dataplex.v1.JobEvent.Type type = 7; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\JobEvent\Type::class); - $this->type = $var; - - return $this; - } - - /** - * The service used to execute the job. - * - * Generated from protobuf field .google.cloud.dataplex.v1.JobEvent.Service service = 8; - * @return int - */ - public function getService() - { - return $this->service; - } - - /** - * The service used to execute the job. - * - * Generated from protobuf field .google.cloud.dataplex.v1.JobEvent.Service service = 8; - * @param int $var - * @return $this - */ - public function setService($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\JobEvent\Service::class); - $this->service = $var; - - return $this; - } - - /** - * The reference to the job within the service. - * - * Generated from protobuf field string service_job = 9; - * @return string - */ - public function getServiceJob() - { - return $this->service_job; - } - - /** - * The reference to the job within the service. - * - * Generated from protobuf field string service_job = 9; - * @param string $var - * @return $this - */ - public function setServiceJob($var) - { - GPBUtil::checkString($var, True); - $this->service_job = $var; - - return $this; - } - - /** - * Job execution trigger. - * - * Generated from protobuf field .google.cloud.dataplex.v1.JobEvent.ExecutionTrigger execution_trigger = 11; - * @return int - */ - public function getExecutionTrigger() - { - return $this->execution_trigger; - } - - /** - * Job execution trigger. - * - * Generated from protobuf field .google.cloud.dataplex.v1.JobEvent.ExecutionTrigger execution_trigger = 11; - * @param int $var - * @return $this - */ - public function setExecutionTrigger($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\JobEvent\ExecutionTrigger::class); - $this->execution_trigger = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/JobEvent/ExecutionTrigger.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/JobEvent/ExecutionTrigger.php deleted file mode 100644 index 57c73028f4ff..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/JobEvent/ExecutionTrigger.php +++ /dev/null @@ -1,65 +0,0 @@ -google.cloud.dataplex.v1.JobEvent.ExecutionTrigger - */ -class ExecutionTrigger -{ - /** - * The job execution trigger is unspecified. - * - * Generated from protobuf enum EXECUTION_TRIGGER_UNSPECIFIED = 0; - */ - const EXECUTION_TRIGGER_UNSPECIFIED = 0; - /** - * The job was triggered by Dataplex based on trigger spec from task - * definition. - * - * Generated from protobuf enum TASK_CONFIG = 1; - */ - const TASK_CONFIG = 1; - /** - * The job was triggered by the explicit call of Task API. - * - * Generated from protobuf enum RUN_REQUEST = 2; - */ - const RUN_REQUEST = 2; - - private static $valueToName = [ - self::EXECUTION_TRIGGER_UNSPECIFIED => 'EXECUTION_TRIGGER_UNSPECIFIED', - self::TASK_CONFIG => 'TASK_CONFIG', - self::RUN_REQUEST => 'RUN_REQUEST', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ExecutionTrigger::class, \Google\Cloud\Dataplex\V1\JobEvent_ExecutionTrigger::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/JobEvent/Service.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/JobEvent/Service.php deleted file mode 100644 index 14aa09b7b03b..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/JobEvent/Service.php +++ /dev/null @@ -1,57 +0,0 @@ -google.cloud.dataplex.v1.JobEvent.Service - */ -class Service -{ - /** - * Unspecified service. - * - * Generated from protobuf enum SERVICE_UNSPECIFIED = 0; - */ - const SERVICE_UNSPECIFIED = 0; - /** - * Cloud Dataproc. - * - * Generated from protobuf enum DATAPROC = 1; - */ - const DATAPROC = 1; - - private static $valueToName = [ - self::SERVICE_UNSPECIFIED => 'SERVICE_UNSPECIFIED', - self::DATAPROC => 'DATAPROC', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Service::class, \Google\Cloud\Dataplex\V1\JobEvent_Service::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/JobEvent/State.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/JobEvent/State.php deleted file mode 100644 index 11e855f84d74..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/JobEvent/State.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.dataplex.v1.JobEvent.State - */ -class State -{ - /** - * Unspecified job state. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Job successfully completed. - * - * Generated from protobuf enum SUCCEEDED = 1; - */ - const SUCCEEDED = 1; - /** - * Job was unsuccessful. - * - * Generated from protobuf enum FAILED = 2; - */ - const FAILED = 2; - /** - * Job was cancelled by the user. - * - * Generated from protobuf enum CANCELLED = 3; - */ - const CANCELLED = 3; - /** - * Job was cancelled or aborted via the service executing the job. - * - * Generated from protobuf enum ABORTED = 4; - */ - const ABORTED = 4; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::SUCCEEDED => 'SUCCEEDED', - self::FAILED => 'FAILED', - self::CANCELLED => 'CANCELLED', - self::ABORTED => 'ABORTED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\Dataplex\V1\JobEvent_State::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/JobEvent/Type.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/JobEvent/Type.php deleted file mode 100644 index b30325d652ae..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/JobEvent/Type.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.dataplex.v1.JobEvent.Type - */ -class Type -{ - /** - * Unspecified job type. - * - * Generated from protobuf enum TYPE_UNSPECIFIED = 0; - */ - const TYPE_UNSPECIFIED = 0; - /** - * Spark jobs. - * - * Generated from protobuf enum SPARK = 1; - */ - const SPARK = 1; - /** - * Notebook jobs. - * - * Generated from protobuf enum NOTEBOOK = 2; - */ - const NOTEBOOK = 2; - - private static $valueToName = [ - self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', - self::SPARK => 'SPARK', - self::NOTEBOOK => 'NOTEBOOK', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Type::class, \Google\Cloud\Dataplex\V1\JobEvent_Type::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Lake.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Lake.php deleted file mode 100644 index 29862ba39797..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Lake.php +++ /dev/null @@ -1,518 +0,0 @@ -google.cloud.dataplex.v1.Lake - */ -class Lake extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The relative resource name of the lake, of the form: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. User friendly display name. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $display_name = ''; - /** - * Output only. System generated globally unique ID for the lake. This ID will - * be different if the lake is deleted and re-created with the same name. - * - * Generated from protobuf field string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - /** - * Output only. The time when the lake was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time when the lake was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Optional. User-defined labels for the lake. - * - * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * Optional. Description of the lake. - * - * Generated from protobuf field string description = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Output only. Current state of the lake. - * - * Generated from protobuf field .google.cloud.dataplex.v1.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. Service account associated with this lake. This service - * account must be authorized to access or operate on resources managed by the - * lake. - * - * Generated from protobuf field string service_account = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $service_account = ''; - /** - * Optional. Settings to manage lake and Dataproc Metastore service instance - * association. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Lake.Metastore metastore = 102 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $metastore = null; - /** - * Output only. Aggregated status of the underlying assets of the lake. - * - * Generated from protobuf field .google.cloud.dataplex.v1.AssetStatus asset_status = 103 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $asset_status = null; - /** - * Output only. Metastore status of the lake. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Lake.MetastoreStatus metastore_status = 104 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $metastore_status = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The relative resource name of the lake, of the form: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * @type string $display_name - * Optional. User friendly display name. - * @type string $uid - * Output only. System generated globally unique ID for the lake. This ID will - * be different if the lake is deleted and re-created with the same name. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time when the lake was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time when the lake was last updated. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. User-defined labels for the lake. - * @type string $description - * Optional. Description of the lake. - * @type int $state - * Output only. Current state of the lake. - * @type string $service_account - * Output only. Service account associated with this lake. This service - * account must be authorized to access or operate on resources managed by the - * lake. - * @type \Google\Cloud\Dataplex\V1\Lake\Metastore $metastore - * Optional. Settings to manage lake and Dataproc Metastore service instance - * association. - * @type \Google\Cloud\Dataplex\V1\AssetStatus $asset_status - * Output only. Aggregated status of the underlying assets of the lake. - * @type \Google\Cloud\Dataplex\V1\Lake\MetastoreStatus $metastore_status - * Output only. Metastore status of the lake. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The relative resource name of the lake, of the form: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The relative resource name of the lake, of the form: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. User friendly display name. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Optional. User friendly display name. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Output only. System generated globally unique ID for the lake. This ID will - * be different if the lake is deleted and re-created with the same name. - * - * Generated from protobuf field string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. System generated globally unique ID for the lake. This ID will - * be different if the lake is deleted and re-created with the same name. - * - * Generated from protobuf field string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - - /** - * Output only. The time when the lake was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time when the lake was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The time when the lake was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The time when the lake was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Optional. User-defined labels for the lake. - * - * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. User-defined labels for the lake. - * - * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Optional. Description of the lake. - * - * Generated from protobuf field string description = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. Description of the lake. - * - * Generated from protobuf field string description = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Output only. Current state of the lake. - * - * Generated from protobuf field .google.cloud.dataplex.v1.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. Current state of the lake. - * - * Generated from protobuf field .google.cloud.dataplex.v1.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. Service account associated with this lake. This service - * account must be authorized to access or operate on resources managed by the - * lake. - * - * Generated from protobuf field string service_account = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getServiceAccount() - { - return $this->service_account; - } - - /** - * Output only. Service account associated with this lake. This service - * account must be authorized to access or operate on resources managed by the - * lake. - * - * Generated from protobuf field string service_account = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setServiceAccount($var) - { - GPBUtil::checkString($var, True); - $this->service_account = $var; - - return $this; - } - - /** - * Optional. Settings to manage lake and Dataproc Metastore service instance - * association. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Lake.Metastore metastore = 102 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataplex\V1\Lake\Metastore|null - */ - public function getMetastore() - { - return $this->metastore; - } - - public function hasMetastore() - { - return isset($this->metastore); - } - - public function clearMetastore() - { - unset($this->metastore); - } - - /** - * Optional. Settings to manage lake and Dataproc Metastore service instance - * association. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Lake.Metastore metastore = 102 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataplex\V1\Lake\Metastore $var - * @return $this - */ - public function setMetastore($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Lake\Metastore::class); - $this->metastore = $var; - - return $this; - } - - /** - * Output only. Aggregated status of the underlying assets of the lake. - * - * Generated from protobuf field .google.cloud.dataplex.v1.AssetStatus asset_status = 103 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Dataplex\V1\AssetStatus|null - */ - public function getAssetStatus() - { - return $this->asset_status; - } - - public function hasAssetStatus() - { - return isset($this->asset_status); - } - - public function clearAssetStatus() - { - unset($this->asset_status); - } - - /** - * Output only. Aggregated status of the underlying assets of the lake. - * - * Generated from protobuf field .google.cloud.dataplex.v1.AssetStatus asset_status = 103 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Dataplex\V1\AssetStatus $var - * @return $this - */ - public function setAssetStatus($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\AssetStatus::class); - $this->asset_status = $var; - - return $this; - } - - /** - * Output only. Metastore status of the lake. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Lake.MetastoreStatus metastore_status = 104 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Dataplex\V1\Lake\MetastoreStatus|null - */ - public function getMetastoreStatus() - { - return $this->metastore_status; - } - - public function hasMetastoreStatus() - { - return isset($this->metastore_status); - } - - public function clearMetastoreStatus() - { - unset($this->metastore_status); - } - - /** - * Output only. Metastore status of the lake. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Lake.MetastoreStatus metastore_status = 104 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Dataplex\V1\Lake\MetastoreStatus $var - * @return $this - */ - public function setMetastoreStatus($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Lake\MetastoreStatus::class); - $this->metastore_status = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Lake/Metastore.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Lake/Metastore.php deleted file mode 100644 index 3af3e06ed129..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Lake/Metastore.php +++ /dev/null @@ -1,82 +0,0 @@ -google.cloud.dataplex.v1.Lake.Metastore - */ -class Metastore extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. A relative reference to the Dataproc Metastore - * (https://cloud.google.com/dataproc-metastore/docs) service associated - * with the lake: - * `projects/{project_id}/locations/{location_id}/services/{service_id}` - * - * Generated from protobuf field string service = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $service = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $service - * Optional. A relative reference to the Dataproc Metastore - * (https://cloud.google.com/dataproc-metastore/docs) service associated - * with the lake: - * `projects/{project_id}/locations/{location_id}/services/{service_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Optional. A relative reference to the Dataproc Metastore - * (https://cloud.google.com/dataproc-metastore/docs) service associated - * with the lake: - * `projects/{project_id}/locations/{location_id}/services/{service_id}` - * - * Generated from protobuf field string service = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getService() - { - return $this->service; - } - - /** - * Optional. A relative reference to the Dataproc Metastore - * (https://cloud.google.com/dataproc-metastore/docs) service associated - * with the lake: - * `projects/{project_id}/locations/{location_id}/services/{service_id}` - * - * Generated from protobuf field string service = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setService($var) - { - GPBUtil::checkString($var, True); - $this->service = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Metastore::class, \Google\Cloud\Dataplex\V1\Lake_Metastore::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Lake/MetastoreStatus.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Lake/MetastoreStatus.php deleted file mode 100644 index 26a7a00c8ad9..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Lake/MetastoreStatus.php +++ /dev/null @@ -1,182 +0,0 @@ -google.cloud.dataplex.v1.Lake.MetastoreStatus - */ -class MetastoreStatus extends \Google\Protobuf\Internal\Message -{ - /** - * Current state of association. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Lake.MetastoreStatus.State state = 1; - */ - protected $state = 0; - /** - * Additional information about the current status. - * - * Generated from protobuf field string message = 2; - */ - protected $message = ''; - /** - * Last update time of the metastore status of the lake. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; - */ - protected $update_time = null; - /** - * The URI of the endpoint used to access the Metastore service. - * - * Generated from protobuf field string endpoint = 4; - */ - protected $endpoint = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $state - * Current state of association. - * @type string $message - * Additional information about the current status. - * @type \Google\Protobuf\Timestamp $update_time - * Last update time of the metastore status of the lake. - * @type string $endpoint - * The URI of the endpoint used to access the Metastore service. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Current state of association. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Lake.MetastoreStatus.State state = 1; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Current state of association. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Lake.MetastoreStatus.State state = 1; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\Lake\MetastoreStatus\State::class); - $this->state = $var; - - return $this; - } - - /** - * Additional information about the current status. - * - * Generated from protobuf field string message = 2; - * @return string - */ - public function getMessage() - { - return $this->message; - } - - /** - * Additional information about the current status. - * - * Generated from protobuf field string message = 2; - * @param string $var - * @return $this - */ - public function setMessage($var) - { - GPBUtil::checkString($var, True); - $this->message = $var; - - return $this; - } - - /** - * Last update time of the metastore status of the lake. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Last update time of the metastore status of the lake. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * The URI of the endpoint used to access the Metastore service. - * - * Generated from protobuf field string endpoint = 4; - * @return string - */ - public function getEndpoint() - { - return $this->endpoint; - } - - /** - * The URI of the endpoint used to access the Metastore service. - * - * Generated from protobuf field string endpoint = 4; - * @param string $var - * @return $this - */ - public function setEndpoint($var) - { - GPBUtil::checkString($var, True); - $this->endpoint = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(MetastoreStatus::class, \Google\Cloud\Dataplex\V1\Lake_MetastoreStatus::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Lake/MetastoreStatus/State.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Lake/MetastoreStatus/State.php deleted file mode 100644 index c80f36501c7e..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Lake/MetastoreStatus/State.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.dataplex.v1.Lake.MetastoreStatus.State - */ -class State -{ - /** - * Unspecified. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * A Metastore service instance is not associated with the lake. - * - * Generated from protobuf enum NONE = 1; - */ - const NONE = 1; - /** - * A Metastore service instance is attached to the lake. - * - * Generated from protobuf enum READY = 2; - */ - const READY = 2; - /** - * Attach/detach is in progress. - * - * Generated from protobuf enum UPDATING = 3; - */ - const UPDATING = 3; - /** - * Attach/detach could not be done due to errors. - * - * Generated from protobuf enum ERROR = 4; - */ - const ERROR = 4; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::NONE => 'NONE', - self::READY => 'READY', - self::UPDATING => 'UPDATING', - self::ERROR => 'ERROR', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\Dataplex\V1\Lake_MetastoreStatus_State::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListActionsResponse.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListActionsResponse.php deleted file mode 100644 index fe396fe3f398..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListActionsResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.dataplex.v1.ListActionsResponse - */ -class ListActionsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Actions under the given parent lake/zone/asset. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.Action actions = 1; - */ - private $actions; - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Dataplex\V1\Action>|\Google\Protobuf\Internal\RepeatedField $actions - * Actions under the given parent lake/zone/asset. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Actions under the given parent lake/zone/asset. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.Action actions = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getActions() - { - return $this->actions; - } - - /** - * Actions under the given parent lake/zone/asset. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.Action actions = 1; - * @param array<\Google\Cloud\Dataplex\V1\Action>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setActions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\Action::class); - $this->actions = $arr; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListAspectTypesRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListAspectTypesRequest.php deleted file mode 100644 index a11659483447..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListAspectTypesRequest.php +++ /dev/null @@ -1,275 +0,0 @@ -google.cloud.dataplex.v1.ListAspectTypesRequest - */ -class ListAspectTypesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the AspectType location, of the form: - * `projects/{project_number}/locations/{location_id}` - * where `location_id` refers to a GCP region. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Maximum number of AspectTypes to return. The service may return - * fewer than this value. If unspecified, at most 10 AspectTypes will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. Page token received from a previous `ListAspectTypes` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListAspectTypes` must match the call that provided - * the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. Filter request. Filters are case-sensitive. - * The following formats are supported: - * labels.key1 = "value1" - * labels:key1 - * name = "value" - * These restrictions can be coinjoined with AND, OR and NOT conjunctions. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. Order by fields (`name` or `create_time`) for the result. - * If not specified, the ordering is undefined. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The resource name of the AspectType location, of the form: - * `projects/{project_number}/locations/{location_id}` - * where `location_id` refers to a GCP region. Please see - * {@see CatalogServiceClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\ListAspectTypesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the AspectType location, of the form: - * `projects/{project_number}/locations/{location_id}` - * where `location_id` refers to a GCP region. - * @type int $page_size - * Optional. Maximum number of AspectTypes to return. The service may return - * fewer than this value. If unspecified, at most 10 AspectTypes will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * @type string $page_token - * Optional. Page token received from a previous `ListAspectTypes` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListAspectTypes` must match the call that provided - * the page token. - * @type string $filter - * Optional. Filter request. Filters are case-sensitive. - * The following formats are supported: - * labels.key1 = "value1" - * labels:key1 - * name = "value" - * These restrictions can be coinjoined with AND, OR and NOT conjunctions. - * @type string $order_by - * Optional. Order by fields (`name` or `create_time`) for the result. - * If not specified, the ordering is undefined. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Catalog::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the AspectType location, of the form: - * `projects/{project_number}/locations/{location_id}` - * where `location_id` refers to a GCP region. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The resource name of the AspectType location, of the form: - * `projects/{project_number}/locations/{location_id}` - * where `location_id` refers to a GCP region. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. Maximum number of AspectTypes to return. The service may return - * fewer than this value. If unspecified, at most 10 AspectTypes will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. Maximum number of AspectTypes to return. The service may return - * fewer than this value. If unspecified, at most 10 AspectTypes will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. Page token received from a previous `ListAspectTypes` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListAspectTypes` must match the call that provided - * the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. Page token received from a previous `ListAspectTypes` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListAspectTypes` must match the call that provided - * the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Optional. Filter request. Filters are case-sensitive. - * The following formats are supported: - * labels.key1 = "value1" - * labels:key1 - * name = "value" - * These restrictions can be coinjoined with AND, OR and NOT conjunctions. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. Filter request. Filters are case-sensitive. - * The following formats are supported: - * labels.key1 = "value1" - * labels:key1 - * name = "value" - * These restrictions can be coinjoined with AND, OR and NOT conjunctions. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Optional. Order by fields (`name` or `create_time`) for the result. - * If not specified, the ordering is undefined. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. Order by fields (`name` or `create_time`) for the result. - * If not specified, the ordering is undefined. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListAspectTypesResponse.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListAspectTypesResponse.php deleted file mode 100644 index c5c8db54c1b0..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListAspectTypesResponse.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.dataplex.v1.ListAspectTypesResponse - */ -class ListAspectTypesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * ListAspectTypes under the given parent location. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.AspectType aspect_types = 1; - */ - private $aspect_types; - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable_locations = 3; - */ - private $unreachable_locations; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Dataplex\V1\AspectType>|\Google\Protobuf\Internal\RepeatedField $aspect_types - * ListAspectTypes under the given parent location. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable_locations - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Catalog::initOnce(); - parent::__construct($data); - } - - /** - * ListAspectTypes under the given parent location. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.AspectType aspect_types = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAspectTypes() - { - return $this->aspect_types; - } - - /** - * ListAspectTypes under the given parent location. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.AspectType aspect_types = 1; - * @param array<\Google\Cloud\Dataplex\V1\AspectType>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAspectTypes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\AspectType::class); - $this->aspect_types = $arr; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable_locations = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachableLocations() - { - return $this->unreachable_locations; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable_locations = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachableLocations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable_locations = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListAssetActionsRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListAssetActionsRequest.php deleted file mode 100644 index ac5d5fa802be..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListAssetActionsRequest.php +++ /dev/null @@ -1,174 +0,0 @@ -google.cloud.dataplex.v1.ListAssetActionsRequest - */ -class ListAssetActionsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the parent asset: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Maximum number of actions to return. The service may return fewer - * than this value. If unspecified, at most 10 actions will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. Page token received from a previous `ListAssetActions` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListAssetActions` must match the call that provided - * the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The resource name of the parent asset: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. Please see - * {@see DataplexServiceClient::assetName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\ListAssetActionsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the parent asset: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. - * @type int $page_size - * Optional. Maximum number of actions to return. The service may return fewer - * than this value. If unspecified, at most 10 actions will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. - * @type string $page_token - * Optional. Page token received from a previous `ListAssetActions` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListAssetActions` must match the call that provided - * the page token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the parent asset: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The resource name of the parent asset: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. Maximum number of actions to return. The service may return fewer - * than this value. If unspecified, at most 10 actions will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. Maximum number of actions to return. The service may return fewer - * than this value. If unspecified, at most 10 actions will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. Page token received from a previous `ListAssetActions` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListAssetActions` must match the call that provided - * the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. Page token received from a previous `ListAssetActions` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListAssetActions` must match the call that provided - * the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListAssetsRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListAssetsRequest.php deleted file mode 100644 index 7509ce399872..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListAssetsRequest.php +++ /dev/null @@ -1,242 +0,0 @@ -google.cloud.dataplex.v1.ListAssetsRequest - */ -class ListAssetsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Maximum number of asset to return. The service may return fewer - * than this value. If unspecified, at most 10 assets will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. Page token received from a previous `ListAssets` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListAssets` must match the call that provided the page - * token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. Filter request. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. Order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The resource name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. Please see - * {@see DataplexServiceClient::zoneName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\ListAssetsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * @type int $page_size - * Optional. Maximum number of asset to return. The service may return fewer - * than this value. If unspecified, at most 10 assets will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. - * @type string $page_token - * Optional. Page token received from a previous `ListAssets` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListAssets` must match the call that provided the page - * token. - * @type string $filter - * Optional. Filter request. - * @type string $order_by - * Optional. Order by fields for the result. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The resource name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. Maximum number of asset to return. The service may return fewer - * than this value. If unspecified, at most 10 assets will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. Maximum number of asset to return. The service may return fewer - * than this value. If unspecified, at most 10 assets will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. Page token received from a previous `ListAssets` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListAssets` must match the call that provided the page - * token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. Page token received from a previous `ListAssets` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListAssets` must match the call that provided the page - * token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Optional. Filter request. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. Filter request. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Optional. Order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. Order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListAssetsResponse.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListAssetsResponse.php deleted file mode 100644 index 44d12c30ab42..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListAssetsResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.dataplex.v1.ListAssetsResponse - */ -class ListAssetsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Asset under the given parent zone. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.Asset assets = 1; - */ - private $assets; - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Dataplex\V1\Asset>|\Google\Protobuf\Internal\RepeatedField $assets - * Asset under the given parent zone. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Asset under the given parent zone. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.Asset assets = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAssets() - { - return $this->assets; - } - - /** - * Asset under the given parent zone. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.Asset assets = 1; - * @param array<\Google\Cloud\Dataplex\V1\Asset>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAssets($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\Asset::class); - $this->assets = $arr; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListContentRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListContentRequest.php deleted file mode 100644 index df25d8b1b3b8..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListContentRequest.php +++ /dev/null @@ -1,232 +0,0 @@ -google.cloud.dataplex.v1.ListContentRequest - */ -class ListContentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the parent lake: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id} - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Maximum number of content to return. The service may return fewer - * than this value. If unspecified, at most 10 content will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. Page token received from a previous `ListContent` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListContent` must match the call that provided the page - * token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. Filter request. Filters are case-sensitive. - * The following formats are supported: - * labels.key1 = "value1" - * labels:key1 - * type = "NOTEBOOK" - * type = "SQL_SCRIPT" - * These restrictions can be coinjoined with AND, OR and NOT conjunctions. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - - /** - * @param string $parent Required. The resource name of the parent lake: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id} - * Please see {@see ContentServiceClient::lakeName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\ListContentRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the parent lake: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id} - * @type int $page_size - * Optional. Maximum number of content to return. The service may return fewer - * than this value. If unspecified, at most 10 content will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. - * @type string $page_token - * Optional. Page token received from a previous `ListContent` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListContent` must match the call that provided the page - * token. - * @type string $filter - * Optional. Filter request. Filters are case-sensitive. - * The following formats are supported: - * labels.key1 = "value1" - * labels:key1 - * type = "NOTEBOOK" - * type = "SQL_SCRIPT" - * These restrictions can be coinjoined with AND, OR and NOT conjunctions. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Content::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the parent lake: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id} - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The resource name of the parent lake: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id} - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. Maximum number of content to return. The service may return fewer - * than this value. If unspecified, at most 10 content will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. Maximum number of content to return. The service may return fewer - * than this value. If unspecified, at most 10 content will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. Page token received from a previous `ListContent` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListContent` must match the call that provided the page - * token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. Page token received from a previous `ListContent` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListContent` must match the call that provided the page - * token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Optional. Filter request. Filters are case-sensitive. - * The following formats are supported: - * labels.key1 = "value1" - * labels:key1 - * type = "NOTEBOOK" - * type = "SQL_SCRIPT" - * These restrictions can be coinjoined with AND, OR and NOT conjunctions. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. Filter request. Filters are case-sensitive. - * The following formats are supported: - * labels.key1 = "value1" - * labels:key1 - * type = "NOTEBOOK" - * type = "SQL_SCRIPT" - * These restrictions can be coinjoined with AND, OR and NOT conjunctions. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListContentResponse.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListContentResponse.php deleted file mode 100644 index b66d35eec61d..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListContentResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.dataplex.v1.ListContentResponse - */ -class ListContentResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Content under the given parent lake. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.Content content = 1; - */ - private $content; - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Dataplex\V1\Content>|\Google\Protobuf\Internal\RepeatedField $content - * Content under the given parent lake. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Content::initOnce(); - parent::__construct($data); - } - - /** - * Content under the given parent lake. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.Content content = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getContent() - { - return $this->content; - } - - /** - * Content under the given parent lake. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.Content content = 1; - * @param array<\Google\Cloud\Dataplex\V1\Content>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setContent($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\Content::class); - $this->content = $arr; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataAttributeBindingsRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataAttributeBindingsRequest.php deleted file mode 100644 index 8e0d0c433968..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataAttributeBindingsRequest.php +++ /dev/null @@ -1,262 +0,0 @@ -google.cloud.dataplex.v1.ListDataAttributeBindingsRequest - */ -class ListDataAttributeBindingsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the Location: - * projects/{project_number}/locations/{location_id} - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Maximum number of DataAttributeBindings to return. The service - * may return fewer than this value. If unspecified, at most 10 - * DataAttributeBindings will be returned. The maximum value is 1000; values - * above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. Page token received from a previous `ListDataAttributeBindings` - * call. Provide this to retrieve the subsequent page. When paginating, all - * other parameters provided to `ListDataAttributeBindings` must match the - * call that provided the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. Filter request. - * Filter using resource: filter=resource:"resource-name" - * Filter using attribute: filter=attributes:"attribute-name" - * Filter using attribute in paths list: - * filter=paths.attributes:"attribute-name" - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. Order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The resource name of the Location: - * projects/{project_number}/locations/{location_id} - * Please see {@see DataTaxonomyServiceClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\ListDataAttributeBindingsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the Location: - * projects/{project_number}/locations/{location_id} - * @type int $page_size - * Optional. Maximum number of DataAttributeBindings to return. The service - * may return fewer than this value. If unspecified, at most 10 - * DataAttributeBindings will be returned. The maximum value is 1000; values - * above 1000 will be coerced to 1000. - * @type string $page_token - * Optional. Page token received from a previous `ListDataAttributeBindings` - * call. Provide this to retrieve the subsequent page. When paginating, all - * other parameters provided to `ListDataAttributeBindings` must match the - * call that provided the page token. - * @type string $filter - * Optional. Filter request. - * Filter using resource: filter=resource:"resource-name" - * Filter using attribute: filter=attributes:"attribute-name" - * Filter using attribute in paths list: - * filter=paths.attributes:"attribute-name" - * @type string $order_by - * Optional. Order by fields for the result. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataTaxonomy::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the Location: - * projects/{project_number}/locations/{location_id} - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The resource name of the Location: - * projects/{project_number}/locations/{location_id} - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. Maximum number of DataAttributeBindings to return. The service - * may return fewer than this value. If unspecified, at most 10 - * DataAttributeBindings will be returned. The maximum value is 1000; values - * above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. Maximum number of DataAttributeBindings to return. The service - * may return fewer than this value. If unspecified, at most 10 - * DataAttributeBindings will be returned. The maximum value is 1000; values - * above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. Page token received from a previous `ListDataAttributeBindings` - * call. Provide this to retrieve the subsequent page. When paginating, all - * other parameters provided to `ListDataAttributeBindings` must match the - * call that provided the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. Page token received from a previous `ListDataAttributeBindings` - * call. Provide this to retrieve the subsequent page. When paginating, all - * other parameters provided to `ListDataAttributeBindings` must match the - * call that provided the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Optional. Filter request. - * Filter using resource: filter=resource:"resource-name" - * Filter using attribute: filter=attributes:"attribute-name" - * Filter using attribute in paths list: - * filter=paths.attributes:"attribute-name" - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. Filter request. - * Filter using resource: filter=resource:"resource-name" - * Filter using attribute: filter=attributes:"attribute-name" - * Filter using attribute in paths list: - * filter=paths.attributes:"attribute-name" - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Optional. Order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. Order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataAttributeBindingsResponse.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataAttributeBindingsResponse.php deleted file mode 100644 index f4d75e557b7c..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataAttributeBindingsResponse.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.dataplex.v1.ListDataAttributeBindingsResponse - */ -class ListDataAttributeBindingsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * DataAttributeBindings under the given parent Location. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataAttributeBinding data_attribute_bindings = 1; - */ - private $data_attribute_bindings; - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable_locations = 3; - */ - private $unreachable_locations; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Dataplex\V1\DataAttributeBinding>|\Google\Protobuf\Internal\RepeatedField $data_attribute_bindings - * DataAttributeBindings under the given parent Location. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable_locations - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataTaxonomy::initOnce(); - parent::__construct($data); - } - - /** - * DataAttributeBindings under the given parent Location. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataAttributeBinding data_attribute_bindings = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDataAttributeBindings() - { - return $this->data_attribute_bindings; - } - - /** - * DataAttributeBindings under the given parent Location. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataAttributeBinding data_attribute_bindings = 1; - * @param array<\Google\Cloud\Dataplex\V1\DataAttributeBinding>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDataAttributeBindings($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\DataAttributeBinding::class); - $this->data_attribute_bindings = $arr; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable_locations = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachableLocations() - { - return $this->unreachable_locations; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable_locations = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachableLocations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable_locations = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataAttributesRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataAttributesRequest.php deleted file mode 100644 index 94503d7719b2..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataAttributesRequest.php +++ /dev/null @@ -1,246 +0,0 @@ -google.cloud.dataplex.v1.ListDataAttributesRequest - */ -class ListDataAttributesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the DataTaxonomy: - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Maximum number of DataAttributes to return. The service may - * return fewer than this value. If unspecified, at most 10 dataAttributes - * will be returned. The maximum value is 1000; values above 1000 will be - * coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. Page token received from a previous `ListDataAttributes` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListDataAttributes` must match the call that - * provided the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. Filter request. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. Order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The resource name of the DataTaxonomy: - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} - * Please see {@see DataTaxonomyServiceClient::dataTaxonomyName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\ListDataAttributesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the DataTaxonomy: - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} - * @type int $page_size - * Optional. Maximum number of DataAttributes to return. The service may - * return fewer than this value. If unspecified, at most 10 dataAttributes - * will be returned. The maximum value is 1000; values above 1000 will be - * coerced to 1000. - * @type string $page_token - * Optional. Page token received from a previous `ListDataAttributes` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListDataAttributes` must match the call that - * provided the page token. - * @type string $filter - * Optional. Filter request. - * @type string $order_by - * Optional. Order by fields for the result. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataTaxonomy::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the DataTaxonomy: - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The resource name of the DataTaxonomy: - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. Maximum number of DataAttributes to return. The service may - * return fewer than this value. If unspecified, at most 10 dataAttributes - * will be returned. The maximum value is 1000; values above 1000 will be - * coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. Maximum number of DataAttributes to return. The service may - * return fewer than this value. If unspecified, at most 10 dataAttributes - * will be returned. The maximum value is 1000; values above 1000 will be - * coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. Page token received from a previous `ListDataAttributes` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListDataAttributes` must match the call that - * provided the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. Page token received from a previous `ListDataAttributes` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListDataAttributes` must match the call that - * provided the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Optional. Filter request. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. Filter request. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Optional. Order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. Order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataAttributesResponse.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataAttributesResponse.php deleted file mode 100644 index 393dea1f5b47..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataAttributesResponse.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.dataplex.v1.ListDataAttributesResponse - */ -class ListDataAttributesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * DataAttributes under the given parent DataTaxonomy. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataAttribute data_attributes = 1; - */ - private $data_attributes; - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable_locations = 3; - */ - private $unreachable_locations; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Dataplex\V1\DataAttribute>|\Google\Protobuf\Internal\RepeatedField $data_attributes - * DataAttributes under the given parent DataTaxonomy. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable_locations - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataTaxonomy::initOnce(); - parent::__construct($data); - } - - /** - * DataAttributes under the given parent DataTaxonomy. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataAttribute data_attributes = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDataAttributes() - { - return $this->data_attributes; - } - - /** - * DataAttributes under the given parent DataTaxonomy. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataAttribute data_attributes = 1; - * @param array<\Google\Cloud\Dataplex\V1\DataAttribute>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDataAttributes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\DataAttribute::class); - $this->data_attributes = $arr; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable_locations = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachableLocations() - { - return $this->unreachable_locations; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable_locations = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachableLocations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable_locations = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataScanJobsRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataScanJobsRequest.php deleted file mode 100644 index aec91a29af33..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataScanJobsRequest.php +++ /dev/null @@ -1,266 +0,0 @@ -google.cloud.dataplex.v1.ListDataScanJobsRequest - */ -class ListDataScanJobsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the parent environment: - * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Maximum number of DataScanJobs to return. The service may return - * fewer than this value. If unspecified, at most 10 DataScanJobs will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. Page token received from a previous `ListDataScanJobs` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListDataScanJobs` must match the call that provided - * the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. An expression for filtering the results of the ListDataScanJobs - * request. - * If unspecified, all datascan jobs will be returned. Multiple filters can be - * applied (with `AND`, `OR` logical operators). Filters are case-sensitive. - * Allowed fields are: - * - `start_time` - * - `end_time` - * `start_time` and `end_time` expect RFC-3339 formatted strings (e.g. - * 2018-10-08T18:30:00-07:00). - * For instance, 'start_time > 2018-10-08T00:00:00.123456789Z AND end_time < - * 2018-10-09T00:00:00.123456789Z' limits results to DataScanJobs between - * specified start and end times. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - - /** - * @param string $parent Required. The resource name of the parent environment: - * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. Please see - * {@see DataScanServiceClient::dataScanName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\ListDataScanJobsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the parent environment: - * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * @type int $page_size - * Optional. Maximum number of DataScanJobs to return. The service may return - * fewer than this value. If unspecified, at most 10 DataScanJobs will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * @type string $page_token - * Optional. Page token received from a previous `ListDataScanJobs` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListDataScanJobs` must match the call that provided - * the page token. - * @type string $filter - * Optional. An expression for filtering the results of the ListDataScanJobs - * request. - * If unspecified, all datascan jobs will be returned. Multiple filters can be - * applied (with `AND`, `OR` logical operators). Filters are case-sensitive. - * Allowed fields are: - * - `start_time` - * - `end_time` - * `start_time` and `end_time` expect RFC-3339 formatted strings (e.g. - * 2018-10-08T18:30:00-07:00). - * For instance, 'start_time > 2018-10-08T00:00:00.123456789Z AND end_time < - * 2018-10-09T00:00:00.123456789Z' limits results to DataScanJobs between - * specified start and end times. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Datascans::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the parent environment: - * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The resource name of the parent environment: - * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. Maximum number of DataScanJobs to return. The service may return - * fewer than this value. If unspecified, at most 10 DataScanJobs will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. Maximum number of DataScanJobs to return. The service may return - * fewer than this value. If unspecified, at most 10 DataScanJobs will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. Page token received from a previous `ListDataScanJobs` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListDataScanJobs` must match the call that provided - * the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. Page token received from a previous `ListDataScanJobs` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListDataScanJobs` must match the call that provided - * the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Optional. An expression for filtering the results of the ListDataScanJobs - * request. - * If unspecified, all datascan jobs will be returned. Multiple filters can be - * applied (with `AND`, `OR` logical operators). Filters are case-sensitive. - * Allowed fields are: - * - `start_time` - * - `end_time` - * `start_time` and `end_time` expect RFC-3339 formatted strings (e.g. - * 2018-10-08T18:30:00-07:00). - * For instance, 'start_time > 2018-10-08T00:00:00.123456789Z AND end_time < - * 2018-10-09T00:00:00.123456789Z' limits results to DataScanJobs between - * specified start and end times. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. An expression for filtering the results of the ListDataScanJobs - * request. - * If unspecified, all datascan jobs will be returned. Multiple filters can be - * applied (with `AND`, `OR` logical operators). Filters are case-sensitive. - * Allowed fields are: - * - `start_time` - * - `end_time` - * `start_time` and `end_time` expect RFC-3339 formatted strings (e.g. - * 2018-10-08T18:30:00-07:00). - * For instance, 'start_time > 2018-10-08T00:00:00.123456789Z AND end_time < - * 2018-10-09T00:00:00.123456789Z' limits results to DataScanJobs between - * specified start and end times. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataScanJobsResponse.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataScanJobsResponse.php deleted file mode 100644 index 0768d4f37321..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataScanJobsResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.dataplex.v1.ListDataScanJobsResponse - */ -class ListDataScanJobsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * DataScanJobs (`BASIC` view only) under a given dataScan. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataScanJob data_scan_jobs = 1; - */ - private $data_scan_jobs; - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Dataplex\V1\DataScanJob>|\Google\Protobuf\Internal\RepeatedField $data_scan_jobs - * DataScanJobs (`BASIC` view only) under a given dataScan. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Datascans::initOnce(); - parent::__construct($data); - } - - /** - * DataScanJobs (`BASIC` view only) under a given dataScan. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataScanJob data_scan_jobs = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDataScanJobs() - { - return $this->data_scan_jobs; - } - - /** - * DataScanJobs (`BASIC` view only) under a given dataScan. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataScanJob data_scan_jobs = 1; - * @param array<\Google\Cloud\Dataplex\V1\DataScanJob>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDataScanJobs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\DataScanJob::class); - $this->data_scan_jobs = $arr; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataScansRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataScansRequest.php deleted file mode 100644 index f17be758d891..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataScansRequest.php +++ /dev/null @@ -1,256 +0,0 @@ -google.cloud.dataplex.v1.ListDataScansRequest - */ -class ListDataScansRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the parent location: - * `projects/{project}/locations/{location_id}` - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Maximum number of dataScans to return. The service may return - * fewer than this value. If unspecified, at most 500 scans will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. Page token received from a previous `ListDataScans` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListDataScans` must match the call that provided the - * page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. Filter request. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. Order by fields (`name` or `create_time`) for the result. - * If not specified, the ordering is undefined. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The resource name of the parent location: - * `projects/{project}/locations/{location_id}` - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. Please see - * {@see DataScanServiceClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\ListDataScansRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the parent location: - * `projects/{project}/locations/{location_id}` - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * @type int $page_size - * Optional. Maximum number of dataScans to return. The service may return - * fewer than this value. If unspecified, at most 500 scans will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * @type string $page_token - * Optional. Page token received from a previous `ListDataScans` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListDataScans` must match the call that provided the - * page token. - * @type string $filter - * Optional. Filter request. - * @type string $order_by - * Optional. Order by fields (`name` or `create_time`) for the result. - * If not specified, the ordering is undefined. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Datascans::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the parent location: - * `projects/{project}/locations/{location_id}` - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The resource name of the parent location: - * `projects/{project}/locations/{location_id}` - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. Maximum number of dataScans to return. The service may return - * fewer than this value. If unspecified, at most 500 scans will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. Maximum number of dataScans to return. The service may return - * fewer than this value. If unspecified, at most 500 scans will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. Page token received from a previous `ListDataScans` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListDataScans` must match the call that provided the - * page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. Page token received from a previous `ListDataScans` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListDataScans` must match the call that provided the - * page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Optional. Filter request. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. Filter request. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Optional. Order by fields (`name` or `create_time`) for the result. - * If not specified, the ordering is undefined. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. Order by fields (`name` or `create_time`) for the result. - * If not specified, the ordering is undefined. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataScansResponse.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataScansResponse.php deleted file mode 100644 index 5dd91ea1531c..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataScansResponse.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.dataplex.v1.ListDataScansResponse - */ -class ListDataScansResponse extends \Google\Protobuf\Internal\Message -{ - /** - * DataScans (`BASIC` view only) under the given parent location. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataScan data_scans = 1; - */ - private $data_scans; - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Dataplex\V1\DataScan>|\Google\Protobuf\Internal\RepeatedField $data_scans - * DataScans (`BASIC` view only) under the given parent location. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Datascans::initOnce(); - parent::__construct($data); - } - - /** - * DataScans (`BASIC` view only) under the given parent location. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataScan data_scans = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDataScans() - { - return $this->data_scans; - } - - /** - * DataScans (`BASIC` view only) under the given parent location. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataScan data_scans = 1; - * @param array<\Google\Cloud\Dataplex\V1\DataScan>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDataScans($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\DataScan::class); - $this->data_scans = $arr; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataTaxonomiesRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataTaxonomiesRequest.php deleted file mode 100644 index 655454555997..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataTaxonomiesRequest.php +++ /dev/null @@ -1,251 +0,0 @@ -google.cloud.dataplex.v1.ListDataTaxonomiesRequest - */ -class ListDataTaxonomiesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the DataTaxonomy location, of the form: - * projects/{project_number}/locations/{location_id} - * where `location_id` refers to a GCP region. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Maximum number of DataTaxonomies to return. The service may - * return fewer than this value. If unspecified, at most 10 DataTaxonomies - * will be returned. The maximum value is 1000; values above 1000 will be - * coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. Page token received from a previous ` ListDataTaxonomies` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to ` ListDataTaxonomies` must match the call that - * provided the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. Filter request. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. Order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The resource name of the DataTaxonomy location, of the form: - * projects/{project_number}/locations/{location_id} - * where `location_id` refers to a GCP region. Please see - * {@see DataTaxonomyServiceClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\ListDataTaxonomiesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the DataTaxonomy location, of the form: - * projects/{project_number}/locations/{location_id} - * where `location_id` refers to a GCP region. - * @type int $page_size - * Optional. Maximum number of DataTaxonomies to return. The service may - * return fewer than this value. If unspecified, at most 10 DataTaxonomies - * will be returned. The maximum value is 1000; values above 1000 will be - * coerced to 1000. - * @type string $page_token - * Optional. Page token received from a previous ` ListDataTaxonomies` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to ` ListDataTaxonomies` must match the call that - * provided the page token. - * @type string $filter - * Optional. Filter request. - * @type string $order_by - * Optional. Order by fields for the result. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataTaxonomy::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the DataTaxonomy location, of the form: - * projects/{project_number}/locations/{location_id} - * where `location_id` refers to a GCP region. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The resource name of the DataTaxonomy location, of the form: - * projects/{project_number}/locations/{location_id} - * where `location_id` refers to a GCP region. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. Maximum number of DataTaxonomies to return. The service may - * return fewer than this value. If unspecified, at most 10 DataTaxonomies - * will be returned. The maximum value is 1000; values above 1000 will be - * coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. Maximum number of DataTaxonomies to return. The service may - * return fewer than this value. If unspecified, at most 10 DataTaxonomies - * will be returned. The maximum value is 1000; values above 1000 will be - * coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. Page token received from a previous ` ListDataTaxonomies` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to ` ListDataTaxonomies` must match the call that - * provided the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. Page token received from a previous ` ListDataTaxonomies` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to ` ListDataTaxonomies` must match the call that - * provided the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Optional. Filter request. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. Filter request. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Optional. Order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. Order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataTaxonomiesResponse.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataTaxonomiesResponse.php deleted file mode 100644 index afec40a23ba1..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListDataTaxonomiesResponse.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.dataplex.v1.ListDataTaxonomiesResponse - */ -class ListDataTaxonomiesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * DataTaxonomies under the given parent location. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataTaxonomy data_taxonomies = 1; - */ - private $data_taxonomies; - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable_locations = 3; - */ - private $unreachable_locations; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Dataplex\V1\DataTaxonomy>|\Google\Protobuf\Internal\RepeatedField $data_taxonomies - * DataTaxonomies under the given parent location. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable_locations - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataTaxonomy::initOnce(); - parent::__construct($data); - } - - /** - * DataTaxonomies under the given parent location. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataTaxonomy data_taxonomies = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDataTaxonomies() - { - return $this->data_taxonomies; - } - - /** - * DataTaxonomies under the given parent location. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.DataTaxonomy data_taxonomies = 1; - * @param array<\Google\Cloud\Dataplex\V1\DataTaxonomy>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDataTaxonomies($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\DataTaxonomy::class); - $this->data_taxonomies = $arr; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable_locations = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachableLocations() - { - return $this->unreachable_locations; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable_locations = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachableLocations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable_locations = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListEntitiesRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListEntitiesRequest.php deleted file mode 100644 index 307bb3a83e46..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListEntitiesRequest.php +++ /dev/null @@ -1,270 +0,0 @@ -google.cloud.dataplex.v1.ListEntitiesRequest - */ -class ListEntitiesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Specify the entity view to make a partial list request. - * - * Generated from protobuf field .google.cloud.dataplex.v1.ListEntitiesRequest.EntityView view = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $view = 0; - /** - * Optional. Maximum number of entities to return. The service may return - * fewer than this value. If unspecified, 100 entities will be returned by - * default. The maximum value is 500; larger values will will be truncated to - * 500. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. Page token received from a previous `ListEntities` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListEntities` must match the call that provided the - * page token. - * - * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. The following filter parameters can be added to the URL to limit - * the entities returned by the API: - * - Entity ID: ?filter="id=entityID" - * - Asset ID: ?filter="asset=assetID" - * - Data path ?filter="data_path=gs://my-bucket" - * - Is HIVE compatible: ?filter="hive_compatible=true" - * - Is BigQuery compatible: ?filter="bigquery_compatible=true" - * - * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - - /** - * @param string $parent Required. The resource name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. Please see - * {@see MetadataServiceClient::zoneName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\ListEntitiesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * @type int $view - * Required. Specify the entity view to make a partial list request. - * @type int $page_size - * Optional. Maximum number of entities to return. The service may return - * fewer than this value. If unspecified, 100 entities will be returned by - * default. The maximum value is 500; larger values will will be truncated to - * 500. - * @type string $page_token - * Optional. Page token received from a previous `ListEntities` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListEntities` must match the call that provided the - * page token. - * @type string $filter - * Optional. The following filter parameters can be added to the URL to limit - * the entities returned by the API: - * - Entity ID: ?filter="id=entityID" - * - Asset ID: ?filter="asset=assetID" - * - Data path ?filter="data_path=gs://my-bucket" - * - Is HIVE compatible: ?filter="hive_compatible=true" - * - Is BigQuery compatible: ?filter="bigquery_compatible=true" - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Metadata::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The resource name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. Specify the entity view to make a partial list request. - * - * Generated from protobuf field .google.cloud.dataplex.v1.ListEntitiesRequest.EntityView view = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getView() - { - return $this->view; - } - - /** - * Required. Specify the entity view to make a partial list request. - * - * Generated from protobuf field .google.cloud.dataplex.v1.ListEntitiesRequest.EntityView view = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\ListEntitiesRequest\EntityView::class); - $this->view = $var; - - return $this; - } - - /** - * Optional. Maximum number of entities to return. The service may return - * fewer than this value. If unspecified, 100 entities will be returned by - * default. The maximum value is 500; larger values will will be truncated to - * 500. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. Maximum number of entities to return. The service may return - * fewer than this value. If unspecified, 100 entities will be returned by - * default. The maximum value is 500; larger values will will be truncated to - * 500. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. Page token received from a previous `ListEntities` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListEntities` must match the call that provided the - * page token. - * - * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. Page token received from a previous `ListEntities` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListEntities` must match the call that provided the - * page token. - * - * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Optional. The following filter parameters can be added to the URL to limit - * the entities returned by the API: - * - Entity ID: ?filter="id=entityID" - * - Asset ID: ?filter="asset=assetID" - * - Data path ?filter="data_path=gs://my-bucket" - * - Is HIVE compatible: ?filter="hive_compatible=true" - * - Is BigQuery compatible: ?filter="bigquery_compatible=true" - * - * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. The following filter parameters can be added to the URL to limit - * the entities returned by the API: - * - Entity ID: ?filter="id=entityID" - * - Asset ID: ?filter="asset=assetID" - * - Data path ?filter="data_path=gs://my-bucket" - * - Is HIVE compatible: ?filter="hive_compatible=true" - * - Is BigQuery compatible: ?filter="bigquery_compatible=true" - * - * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListEntitiesRequest/EntityView.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListEntitiesRequest/EntityView.php deleted file mode 100644 index 4a09aa0866d5..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListEntitiesRequest/EntityView.php +++ /dev/null @@ -1,65 +0,0 @@ -google.cloud.dataplex.v1.ListEntitiesRequest.EntityView - */ -class EntityView -{ - /** - * The default unset value. Return both table and fileset entities - * if unspecified. - * - * Generated from protobuf enum ENTITY_VIEW_UNSPECIFIED = 0; - */ - const ENTITY_VIEW_UNSPECIFIED = 0; - /** - * Only list table entities. - * - * Generated from protobuf enum TABLES = 1; - */ - const TABLES = 1; - /** - * Only list fileset entities. - * - * Generated from protobuf enum FILESETS = 2; - */ - const FILESETS = 2; - - private static $valueToName = [ - self::ENTITY_VIEW_UNSPECIFIED => 'ENTITY_VIEW_UNSPECIFIED', - self::TABLES => 'TABLES', - self::FILESETS => 'FILESETS', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(EntityView::class, \Google\Cloud\Dataplex\V1\ListEntitiesRequest_EntityView::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListEntitiesResponse.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListEntitiesResponse.php deleted file mode 100644 index a7fa7797c537..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListEntitiesResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.dataplex.v1.ListEntitiesResponse - */ -class ListEntitiesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Entities in the specified parent zone. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.Entity entities = 1; - */ - private $entities; - /** - * Token to retrieve the next page of results, or empty if there are no - * remaining results in the list. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Dataplex\V1\Entity>|\Google\Protobuf\Internal\RepeatedField $entities - * Entities in the specified parent zone. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no - * remaining results in the list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Metadata::initOnce(); - parent::__construct($data); - } - - /** - * Entities in the specified parent zone. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.Entity entities = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEntities() - { - return $this->entities; - } - - /** - * Entities in the specified parent zone. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.Entity entities = 1; - * @param array<\Google\Cloud\Dataplex\V1\Entity>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEntities($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\Entity::class); - $this->entities = $arr; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no - * remaining results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no - * remaining results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListEntriesRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListEntriesRequest.php deleted file mode 100644 index 025edaca17f7..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListEntriesRequest.php +++ /dev/null @@ -1,231 +0,0 @@ -google.cloud.dataplex.v1.ListEntriesRequest - */ -class ListEntriesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the parent Entry Group: - * `projects/{project}/locations/{location}/entryGroups/{entry_group}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. The pagination token returned by a previous request. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. A filter on the entries to return. - * Filters are case-sensitive. - * The request can be filtered by the following fields: - * entry_type, entry_source.display_name. - * The comparison operators are =, !=, <, >, <=, >= (strings are compared - * according to lexical order) - * The logical operators AND, OR, NOT can be used - * in the filter. Wildcard "*" can be used, but for entry_type the full - * project id or number needs to be provided. Example filter expressions: - * "entry_source.display_name=AnExampleDisplayName" - * "entry_type=projects/example-project/locations/global/entryTypes/example-entry_type" - * "entry_type=projects/example-project/locations/us/entryTypes/a* OR - * entry_type=projects/another-project/locations/*" - * "NOT entry_source.display_name=AnotherExampleDisplayName" - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - - /** - * @param string $parent Required. The resource name of the parent Entry Group: - * `projects/{project}/locations/{location}/entryGroups/{entry_group}`. Please see - * {@see CatalogServiceClient::entryGroupName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\ListEntriesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the parent Entry Group: - * `projects/{project}/locations/{location}/entryGroups/{entry_group}`. - * @type int $page_size - * @type string $page_token - * Optional. The pagination token returned by a previous request. - * @type string $filter - * Optional. A filter on the entries to return. - * Filters are case-sensitive. - * The request can be filtered by the following fields: - * entry_type, entry_source.display_name. - * The comparison operators are =, !=, <, >, <=, >= (strings are compared - * according to lexical order) - * The logical operators AND, OR, NOT can be used - * in the filter. Wildcard "*" can be used, but for entry_type the full - * project id or number needs to be provided. Example filter expressions: - * "entry_source.display_name=AnExampleDisplayName" - * "entry_type=projects/example-project/locations/global/entryTypes/example-entry_type" - * "entry_type=projects/example-project/locations/us/entryTypes/a* OR - * entry_type=projects/another-project/locations/*" - * "NOT entry_source.display_name=AnotherExampleDisplayName" - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Catalog::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the parent Entry Group: - * `projects/{project}/locations/{location}/entryGroups/{entry_group}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The resource name of the parent Entry Group: - * `projects/{project}/locations/{location}/entryGroups/{entry_group}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. The pagination token returned by a previous request. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. The pagination token returned by a previous request. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Optional. A filter on the entries to return. - * Filters are case-sensitive. - * The request can be filtered by the following fields: - * entry_type, entry_source.display_name. - * The comparison operators are =, !=, <, >, <=, >= (strings are compared - * according to lexical order) - * The logical operators AND, OR, NOT can be used - * in the filter. Wildcard "*" can be used, but for entry_type the full - * project id or number needs to be provided. Example filter expressions: - * "entry_source.display_name=AnExampleDisplayName" - * "entry_type=projects/example-project/locations/global/entryTypes/example-entry_type" - * "entry_type=projects/example-project/locations/us/entryTypes/a* OR - * entry_type=projects/another-project/locations/*" - * "NOT entry_source.display_name=AnotherExampleDisplayName" - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. A filter on the entries to return. - * Filters are case-sensitive. - * The request can be filtered by the following fields: - * entry_type, entry_source.display_name. - * The comparison operators are =, !=, <, >, <=, >= (strings are compared - * according to lexical order) - * The logical operators AND, OR, NOT can be used - * in the filter. Wildcard "*" can be used, but for entry_type the full - * project id or number needs to be provided. Example filter expressions: - * "entry_source.display_name=AnExampleDisplayName" - * "entry_type=projects/example-project/locations/global/entryTypes/example-entry_type" - * "entry_type=projects/example-project/locations/us/entryTypes/a* OR - * entry_type=projects/another-project/locations/*" - * "NOT entry_source.display_name=AnotherExampleDisplayName" - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListEntriesResponse.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListEntriesResponse.php deleted file mode 100644 index 0c6c72207eb5..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListEntriesResponse.php +++ /dev/null @@ -1,99 +0,0 @@ -google.cloud.dataplex.v1.ListEntriesResponse - */ -class ListEntriesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of entries. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.Entry entries = 1; - */ - private $entries; - /** - * Pagination token. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Dataplex\V1\Entry>|\Google\Protobuf\Internal\RepeatedField $entries - * The list of entries. - * @type string $next_page_token - * Pagination token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Catalog::initOnce(); - parent::__construct($data); - } - - /** - * The list of entries. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.Entry entries = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEntries() - { - return $this->entries; - } - - /** - * The list of entries. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.Entry entries = 1; - * @param array<\Google\Cloud\Dataplex\V1\Entry>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEntries($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\Entry::class); - $this->entries = $arr; - - return $this; - } - - /** - * Pagination token. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Pagination token. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListEntryGroupsRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListEntryGroupsRequest.php deleted file mode 100644 index 6df7e43a8757..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListEntryGroupsRequest.php +++ /dev/null @@ -1,251 +0,0 @@ -google.cloud.dataplex.v1.ListEntryGroupsRequest - */ -class ListEntryGroupsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the entryGroup location, of the form: - * `projects/{project_number}/locations/{location_id}` - * where `location_id` refers to a GCP region. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Maximum number of EntryGroups to return. The service may return - * fewer than this value. If unspecified, at most 10 EntryGroups will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. Page token received from a previous `ListEntryGroups` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListEntryGroups` must match the call that provided - * the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. Filter request. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. Order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The resource name of the entryGroup location, of the form: - * `projects/{project_number}/locations/{location_id}` - * where `location_id` refers to a GCP region. Please see - * {@see CatalogServiceClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\ListEntryGroupsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the entryGroup location, of the form: - * `projects/{project_number}/locations/{location_id}` - * where `location_id` refers to a GCP region. - * @type int $page_size - * Optional. Maximum number of EntryGroups to return. The service may return - * fewer than this value. If unspecified, at most 10 EntryGroups will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * @type string $page_token - * Optional. Page token received from a previous `ListEntryGroups` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListEntryGroups` must match the call that provided - * the page token. - * @type string $filter - * Optional. Filter request. - * @type string $order_by - * Optional. Order by fields for the result. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Catalog::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the entryGroup location, of the form: - * `projects/{project_number}/locations/{location_id}` - * where `location_id` refers to a GCP region. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The resource name of the entryGroup location, of the form: - * `projects/{project_number}/locations/{location_id}` - * where `location_id` refers to a GCP region. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. Maximum number of EntryGroups to return. The service may return - * fewer than this value. If unspecified, at most 10 EntryGroups will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. Maximum number of EntryGroups to return. The service may return - * fewer than this value. If unspecified, at most 10 EntryGroups will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. Page token received from a previous `ListEntryGroups` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListEntryGroups` must match the call that provided - * the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. Page token received from a previous `ListEntryGroups` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListEntryGroups` must match the call that provided - * the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Optional. Filter request. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. Filter request. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Optional. Order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. Order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListEntryGroupsResponse.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListEntryGroupsResponse.php deleted file mode 100644 index fc870fdfad86..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListEntryGroupsResponse.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.dataplex.v1.ListEntryGroupsResponse - */ -class ListEntryGroupsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * ListEntryGroups under the given parent location. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.EntryGroup entry_groups = 1; - */ - private $entry_groups; - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable_locations = 3; - */ - private $unreachable_locations; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Dataplex\V1\EntryGroup>|\Google\Protobuf\Internal\RepeatedField $entry_groups - * ListEntryGroups under the given parent location. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable_locations - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Catalog::initOnce(); - parent::__construct($data); - } - - /** - * ListEntryGroups under the given parent location. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.EntryGroup entry_groups = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEntryGroups() - { - return $this->entry_groups; - } - - /** - * ListEntryGroups under the given parent location. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.EntryGroup entry_groups = 1; - * @param array<\Google\Cloud\Dataplex\V1\EntryGroup>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEntryGroups($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\EntryGroup::class); - $this->entry_groups = $arr; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable_locations = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachableLocations() - { - return $this->unreachable_locations; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable_locations = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachableLocations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable_locations = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListEntryTypesRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListEntryTypesRequest.php deleted file mode 100644 index 17dea956eb5f..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListEntryTypesRequest.php +++ /dev/null @@ -1,275 +0,0 @@ -google.cloud.dataplex.v1.ListEntryTypesRequest - */ -class ListEntryTypesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the EntryType location, of the form: - * `projects/{project_number}/locations/{location_id}` - * where `location_id` refers to a GCP region. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Maximum number of EntryTypes to return. The service may return - * fewer than this value. If unspecified, at most 10 EntryTypes will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. Page token received from a previous `ListEntryTypes` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListEntryTypes` must match the call that provided - * the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. Filter request. Filters are case-sensitive. - * The following formats are supported: - * labels.key1 = "value1" - * labels:key1 - * name = "value" - * These restrictions can be coinjoined with AND, OR and NOT conjunctions. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. Order by fields (`name` or `create_time`) for the result. - * If not specified, the ordering is undefined. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The resource name of the EntryType location, of the form: - * `projects/{project_number}/locations/{location_id}` - * where `location_id` refers to a GCP region. Please see - * {@see CatalogServiceClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\ListEntryTypesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the EntryType location, of the form: - * `projects/{project_number}/locations/{location_id}` - * where `location_id` refers to a GCP region. - * @type int $page_size - * Optional. Maximum number of EntryTypes to return. The service may return - * fewer than this value. If unspecified, at most 10 EntryTypes will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * @type string $page_token - * Optional. Page token received from a previous `ListEntryTypes` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListEntryTypes` must match the call that provided - * the page token. - * @type string $filter - * Optional. Filter request. Filters are case-sensitive. - * The following formats are supported: - * labels.key1 = "value1" - * labels:key1 - * name = "value" - * These restrictions can be coinjoined with AND, OR and NOT conjunctions. - * @type string $order_by - * Optional. Order by fields (`name` or `create_time`) for the result. - * If not specified, the ordering is undefined. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Catalog::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the EntryType location, of the form: - * `projects/{project_number}/locations/{location_id}` - * where `location_id` refers to a GCP region. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The resource name of the EntryType location, of the form: - * `projects/{project_number}/locations/{location_id}` - * where `location_id` refers to a GCP region. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. Maximum number of EntryTypes to return. The service may return - * fewer than this value. If unspecified, at most 10 EntryTypes will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. Maximum number of EntryTypes to return. The service may return - * fewer than this value. If unspecified, at most 10 EntryTypes will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. Page token received from a previous `ListEntryTypes` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListEntryTypes` must match the call that provided - * the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. Page token received from a previous `ListEntryTypes` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListEntryTypes` must match the call that provided - * the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Optional. Filter request. Filters are case-sensitive. - * The following formats are supported: - * labels.key1 = "value1" - * labels:key1 - * name = "value" - * These restrictions can be coinjoined with AND, OR and NOT conjunctions. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. Filter request. Filters are case-sensitive. - * The following formats are supported: - * labels.key1 = "value1" - * labels:key1 - * name = "value" - * These restrictions can be coinjoined with AND, OR and NOT conjunctions. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Optional. Order by fields (`name` or `create_time`) for the result. - * If not specified, the ordering is undefined. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. Order by fields (`name` or `create_time`) for the result. - * If not specified, the ordering is undefined. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListEntryTypesResponse.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListEntryTypesResponse.php deleted file mode 100644 index eb0289be361a..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListEntryTypesResponse.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.dataplex.v1.ListEntryTypesResponse - */ -class ListEntryTypesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * ListEntryTypes under the given parent location. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.EntryType entry_types = 1; - */ - private $entry_types; - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable_locations = 3; - */ - private $unreachable_locations; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Dataplex\V1\EntryType>|\Google\Protobuf\Internal\RepeatedField $entry_types - * ListEntryTypes under the given parent location. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable_locations - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Catalog::initOnce(); - parent::__construct($data); - } - - /** - * ListEntryTypes under the given parent location. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.EntryType entry_types = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEntryTypes() - { - return $this->entry_types; - } - - /** - * ListEntryTypes under the given parent location. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.EntryType entry_types = 1; - * @param array<\Google\Cloud\Dataplex\V1\EntryType>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEntryTypes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\EntryType::class); - $this->entry_types = $arr; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable_locations = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachableLocations() - { - return $this->unreachable_locations; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable_locations = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachableLocations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable_locations = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListEnvironmentsRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListEnvironmentsRequest.php deleted file mode 100644 index cee8197a07b9..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListEnvironmentsRequest.php +++ /dev/null @@ -1,246 +0,0 @@ -google.cloud.dataplex.v1.ListEnvironmentsRequest - */ -class ListEnvironmentsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the parent lake: - * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Maximum number of environments to return. The service may return - * fewer than this value. If unspecified, at most 10 environments will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. Page token received from a previous `ListEnvironments` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListEnvironments` must match the call that provided - * the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. Filter request. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. Order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The resource name of the parent lake: - * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`. Please see - * {@see DataplexServiceClient::lakeName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\ListEnvironmentsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the parent lake: - * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`. - * @type int $page_size - * Optional. Maximum number of environments to return. The service may return - * fewer than this value. If unspecified, at most 10 environments will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * @type string $page_token - * Optional. Page token received from a previous `ListEnvironments` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListEnvironments` must match the call that provided - * the page token. - * @type string $filter - * Optional. Filter request. - * @type string $order_by - * Optional. Order by fields for the result. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the parent lake: - * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The resource name of the parent lake: - * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. Maximum number of environments to return. The service may return - * fewer than this value. If unspecified, at most 10 environments will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. Maximum number of environments to return. The service may return - * fewer than this value. If unspecified, at most 10 environments will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. Page token received from a previous `ListEnvironments` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListEnvironments` must match the call that provided - * the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. Page token received from a previous `ListEnvironments` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListEnvironments` must match the call that provided - * the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Optional. Filter request. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. Filter request. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Optional. Order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. Order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListEnvironmentsResponse.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListEnvironmentsResponse.php deleted file mode 100644 index ffc31f6b154e..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListEnvironmentsResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.dataplex.v1.ListEnvironmentsResponse - */ -class ListEnvironmentsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Environments under the given parent lake. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.Environment environments = 1; - */ - private $environments; - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Dataplex\V1\Environment>|\Google\Protobuf\Internal\RepeatedField $environments - * Environments under the given parent lake. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Environments under the given parent lake. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.Environment environments = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEnvironments() - { - return $this->environments; - } - - /** - * Environments under the given parent lake. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.Environment environments = 1; - * @param array<\Google\Cloud\Dataplex\V1\Environment>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEnvironments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\Environment::class); - $this->environments = $arr; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListJobsRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListJobsRequest.php deleted file mode 100644 index 0e4b9990461a..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListJobsRequest.php +++ /dev/null @@ -1,174 +0,0 @@ -google.cloud.dataplex.v1.ListJobsRequest - */ -class ListJobsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the parent environment: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Maximum number of jobs to return. The service may return fewer - * than this value. If unspecified, at most 10 jobs will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. Page token received from a previous `ListJobs` call. Provide this - * to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListJobs` must match the call that provided the page - * token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The resource name of the parent environment: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. Please see - * {@see DataplexServiceClient::taskName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\ListJobsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the parent environment: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. - * @type int $page_size - * Optional. Maximum number of jobs to return. The service may return fewer - * than this value. If unspecified, at most 10 jobs will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. - * @type string $page_token - * Optional. Page token received from a previous `ListJobs` call. Provide this - * to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListJobs` must match the call that provided the page - * token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the parent environment: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The resource name of the parent environment: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. Maximum number of jobs to return. The service may return fewer - * than this value. If unspecified, at most 10 jobs will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. Maximum number of jobs to return. The service may return fewer - * than this value. If unspecified, at most 10 jobs will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. Page token received from a previous `ListJobs` call. Provide this - * to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListJobs` must match the call that provided the page - * token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. Page token received from a previous `ListJobs` call. Provide this - * to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListJobs` must match the call that provided the page - * token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListJobsResponse.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListJobsResponse.php deleted file mode 100644 index 30ca6bba5fe7..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListJobsResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.dataplex.v1.ListJobsResponse - */ -class ListJobsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Jobs under a given task. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.Job jobs = 1; - */ - private $jobs; - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Dataplex\V1\Job>|\Google\Protobuf\Internal\RepeatedField $jobs - * Jobs under a given task. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Jobs under a given task. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.Job jobs = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getJobs() - { - return $this->jobs; - } - - /** - * Jobs under a given task. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.Job jobs = 1; - * @param array<\Google\Cloud\Dataplex\V1\Job>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setJobs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\Job::class); - $this->jobs = $arr; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListLakeActionsRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListLakeActionsRequest.php deleted file mode 100644 index d73c320fe476..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListLakeActionsRequest.php +++ /dev/null @@ -1,174 +0,0 @@ -google.cloud.dataplex.v1.ListLakeActionsRequest - */ -class ListLakeActionsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the parent lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Maximum number of actions to return. The service may return fewer - * than this value. If unspecified, at most 10 actions will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. Page token received from a previous `ListLakeActions` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListLakeActions` must match the call that provided - * the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The resource name of the parent lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. Please see - * {@see DataplexServiceClient::lakeName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\ListLakeActionsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the parent lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * @type int $page_size - * Optional. Maximum number of actions to return. The service may return fewer - * than this value. If unspecified, at most 10 actions will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. - * @type string $page_token - * Optional. Page token received from a previous `ListLakeActions` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListLakeActions` must match the call that provided - * the page token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the parent lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The resource name of the parent lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. Maximum number of actions to return. The service may return fewer - * than this value. If unspecified, at most 10 actions will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. Maximum number of actions to return. The service may return fewer - * than this value. If unspecified, at most 10 actions will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. Page token received from a previous `ListLakeActions` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListLakeActions` must match the call that provided - * the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. Page token received from a previous `ListLakeActions` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListLakeActions` must match the call that provided - * the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListLakesRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListLakesRequest.php deleted file mode 100644 index 0e9ac3478e75..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListLakesRequest.php +++ /dev/null @@ -1,243 +0,0 @@ -google.cloud.dataplex.v1.ListLakesRequest - */ -class ListLakesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the lake location, of the form: - * `projects/{project_number}/locations/{location_id}` - * where `location_id` refers to a GCP region. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Maximum number of Lakes to return. The service may return fewer - * than this value. If unspecified, at most 10 lakes will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. Page token received from a previous `ListLakes` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListLakes` must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. Filter request. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. Order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The resource name of the lake location, of the form: - * `projects/{project_number}/locations/{location_id}` - * where `location_id` refers to a GCP region. Please see - * {@see DataplexServiceClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\ListLakesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the lake location, of the form: - * `projects/{project_number}/locations/{location_id}` - * where `location_id` refers to a GCP region. - * @type int $page_size - * Optional. Maximum number of Lakes to return. The service may return fewer - * than this value. If unspecified, at most 10 lakes will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. - * @type string $page_token - * Optional. Page token received from a previous `ListLakes` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListLakes` must match the call that provided the page token. - * @type string $filter - * Optional. Filter request. - * @type string $order_by - * Optional. Order by fields for the result. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the lake location, of the form: - * `projects/{project_number}/locations/{location_id}` - * where `location_id` refers to a GCP region. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The resource name of the lake location, of the form: - * `projects/{project_number}/locations/{location_id}` - * where `location_id` refers to a GCP region. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. Maximum number of Lakes to return. The service may return fewer - * than this value. If unspecified, at most 10 lakes will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. Maximum number of Lakes to return. The service may return fewer - * than this value. If unspecified, at most 10 lakes will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. Page token received from a previous `ListLakes` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListLakes` must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. Page token received from a previous `ListLakes` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListLakes` must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Optional. Filter request. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. Filter request. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Optional. Order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. Order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListLakesResponse.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListLakesResponse.php deleted file mode 100644 index 8cd74bcf1dc4..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListLakesResponse.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.dataplex.v1.ListLakesResponse - */ -class ListLakesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Lakes under the given parent location. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.Lake lakes = 1; - */ - private $lakes; - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable_locations = 3; - */ - private $unreachable_locations; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Dataplex\V1\Lake>|\Google\Protobuf\Internal\RepeatedField $lakes - * Lakes under the given parent location. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable_locations - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Lakes under the given parent location. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.Lake lakes = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getLakes() - { - return $this->lakes; - } - - /** - * Lakes under the given parent location. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.Lake lakes = 1; - * @param array<\Google\Cloud\Dataplex\V1\Lake>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setLakes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\Lake::class); - $this->lakes = $arr; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable_locations = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachableLocations() - { - return $this->unreachable_locations; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable_locations = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachableLocations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable_locations = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListPartitionsRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListPartitionsRequest.php deleted file mode 100644 index 4c40edf47281..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListPartitionsRequest.php +++ /dev/null @@ -1,268 +0,0 @@ -google.cloud.dataplex.v1.ListPartitionsRequest - */ -class ListPartitionsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the parent entity: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Maximum number of partitions to return. The service may return - * fewer than this value. If unspecified, 100 partitions will be returned by - * default. The maximum page size is 500; larger values will will be truncated - * to 500. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. Page token received from a previous `ListPartitions` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListPartitions` must match the call that provided - * the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. Filter the partitions returned to the caller using a key value - * pair expression. Supported operators and syntax: - * - logic operators: AND, OR - * - comparison operators: <, >, >=, <= ,=, != - * - LIKE operators: - * - The right hand of a LIKE operator supports "." and - * "*" for wildcard searches, for example "value1 LIKE ".*oo.*" - * - parenthetical grouping: ( ) - * Sample filter expression: `?filter="key1 < value1 OR key2 > value2" - * **Notes:** - * - Keys to the left of operators are case insensitive. - * - Partition results are sorted first by creation time, then by - * lexicographic order. - * - Up to 20 key value filter pairs are allowed, but due to performance - * considerations, only the first 10 will be used as a filter. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - - /** - * @param string $parent Required. The resource name of the parent entity: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. Please see - * {@see MetadataServiceClient::entityName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\ListPartitionsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the parent entity: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. - * @type int $page_size - * Optional. Maximum number of partitions to return. The service may return - * fewer than this value. If unspecified, 100 partitions will be returned by - * default. The maximum page size is 500; larger values will will be truncated - * to 500. - * @type string $page_token - * Optional. Page token received from a previous `ListPartitions` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListPartitions` must match the call that provided - * the page token. - * @type string $filter - * Optional. Filter the partitions returned to the caller using a key value - * pair expression. Supported operators and syntax: - * - logic operators: AND, OR - * - comparison operators: <, >, >=, <= ,=, != - * - LIKE operators: - * - The right hand of a LIKE operator supports "." and - * "*" for wildcard searches, for example "value1 LIKE ".*oo.*" - * - parenthetical grouping: ( ) - * Sample filter expression: `?filter="key1 < value1 OR key2 > value2" - * **Notes:** - * - Keys to the left of operators are case insensitive. - * - Partition results are sorted first by creation time, then by - * lexicographic order. - * - Up to 20 key value filter pairs are allowed, but due to performance - * considerations, only the first 10 will be used as a filter. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Metadata::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the parent entity: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The resource name of the parent entity: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. Maximum number of partitions to return. The service may return - * fewer than this value. If unspecified, 100 partitions will be returned by - * default. The maximum page size is 500; larger values will will be truncated - * to 500. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. Maximum number of partitions to return. The service may return - * fewer than this value. If unspecified, 100 partitions will be returned by - * default. The maximum page size is 500; larger values will will be truncated - * to 500. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. Page token received from a previous `ListPartitions` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListPartitions` must match the call that provided - * the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. Page token received from a previous `ListPartitions` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListPartitions` must match the call that provided - * the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Optional. Filter the partitions returned to the caller using a key value - * pair expression. Supported operators and syntax: - * - logic operators: AND, OR - * - comparison operators: <, >, >=, <= ,=, != - * - LIKE operators: - * - The right hand of a LIKE operator supports "." and - * "*" for wildcard searches, for example "value1 LIKE ".*oo.*" - * - parenthetical grouping: ( ) - * Sample filter expression: `?filter="key1 < value1 OR key2 > value2" - * **Notes:** - * - Keys to the left of operators are case insensitive. - * - Partition results are sorted first by creation time, then by - * lexicographic order. - * - Up to 20 key value filter pairs are allowed, but due to performance - * considerations, only the first 10 will be used as a filter. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. Filter the partitions returned to the caller using a key value - * pair expression. Supported operators and syntax: - * - logic operators: AND, OR - * - comparison operators: <, >, >=, <= ,=, != - * - LIKE operators: - * - The right hand of a LIKE operator supports "." and - * "*" for wildcard searches, for example "value1 LIKE ".*oo.*" - * - parenthetical grouping: ( ) - * Sample filter expression: `?filter="key1 < value1 OR key2 > value2" - * **Notes:** - * - Keys to the left of operators are case insensitive. - * - Partition results are sorted first by creation time, then by - * lexicographic order. - * - Up to 20 key value filter pairs are allowed, but due to performance - * considerations, only the first 10 will be used as a filter. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListPartitionsResponse.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListPartitionsResponse.php deleted file mode 100644 index 06a68cc7020c..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListPartitionsResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.dataplex.v1.ListPartitionsResponse - */ -class ListPartitionsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Partitions under the specified parent entity. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.Partition partitions = 1; - */ - private $partitions; - /** - * Token to retrieve the next page of results, or empty if there are no - * remaining results in the list. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Dataplex\V1\Partition>|\Google\Protobuf\Internal\RepeatedField $partitions - * Partitions under the specified parent entity. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no - * remaining results in the list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Metadata::initOnce(); - parent::__construct($data); - } - - /** - * Partitions under the specified parent entity. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.Partition partitions = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPartitions() - { - return $this->partitions; - } - - /** - * Partitions under the specified parent entity. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.Partition partitions = 1; - * @param array<\Google\Cloud\Dataplex\V1\Partition>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPartitions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\Partition::class); - $this->partitions = $arr; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no - * remaining results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no - * remaining results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListSessionsRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListSessionsRequest.php deleted file mode 100644 index be94f5019e56..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListSessionsRequest.php +++ /dev/null @@ -1,236 +0,0 @@ -google.cloud.dataplex.v1.ListSessionsRequest - */ -class ListSessionsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the parent environment: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Maximum number of sessions to return. The service may return - * fewer than this value. If unspecified, at most 10 sessions will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. Page token received from a previous `ListSessions` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListSessions` must match the call that provided the page - * token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. Filter request. The following `mode` filter is supported to - * return only the sessions belonging to the requester when the mode is USER - * and return sessions of all the users when the mode is ADMIN. When no filter - * is sent default to USER mode. NOTE: When the mode is ADMIN, the requester - * should have `dataplex.environments.listAllSessions` permission to list all - * sessions, in absence of the permission, the request fails. - * mode = ADMIN | USER - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - - /** - * @param string $parent Required. The resource name of the parent environment: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}`. Please see - * {@see DataplexServiceClient::environmentName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\ListSessionsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the parent environment: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}`. - * @type int $page_size - * Optional. Maximum number of sessions to return. The service may return - * fewer than this value. If unspecified, at most 10 sessions will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * @type string $page_token - * Optional. Page token received from a previous `ListSessions` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListSessions` must match the call that provided the page - * token. - * @type string $filter - * Optional. Filter request. The following `mode` filter is supported to - * return only the sessions belonging to the requester when the mode is USER - * and return sessions of all the users when the mode is ADMIN. When no filter - * is sent default to USER mode. NOTE: When the mode is ADMIN, the requester - * should have `dataplex.environments.listAllSessions` permission to list all - * sessions, in absence of the permission, the request fails. - * mode = ADMIN | USER - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the parent environment: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The resource name of the parent environment: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. Maximum number of sessions to return. The service may return - * fewer than this value. If unspecified, at most 10 sessions will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. Maximum number of sessions to return. The service may return - * fewer than this value. If unspecified, at most 10 sessions will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. Page token received from a previous `ListSessions` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListSessions` must match the call that provided the page - * token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. Page token received from a previous `ListSessions` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListSessions` must match the call that provided the page - * token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Optional. Filter request. The following `mode` filter is supported to - * return only the sessions belonging to the requester when the mode is USER - * and return sessions of all the users when the mode is ADMIN. When no filter - * is sent default to USER mode. NOTE: When the mode is ADMIN, the requester - * should have `dataplex.environments.listAllSessions` permission to list all - * sessions, in absence of the permission, the request fails. - * mode = ADMIN | USER - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. Filter request. The following `mode` filter is supported to - * return only the sessions belonging to the requester when the mode is USER - * and return sessions of all the users when the mode is ADMIN. When no filter - * is sent default to USER mode. NOTE: When the mode is ADMIN, the requester - * should have `dataplex.environments.listAllSessions` permission to list all - * sessions, in absence of the permission, the request fails. - * mode = ADMIN | USER - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListSessionsResponse.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListSessionsResponse.php deleted file mode 100644 index 2563a5529f20..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListSessionsResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.dataplex.v1.ListSessionsResponse - */ -class ListSessionsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Sessions under a given environment. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.Session sessions = 1; - */ - private $sessions; - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Dataplex\V1\Session>|\Google\Protobuf\Internal\RepeatedField $sessions - * Sessions under a given environment. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Sessions under a given environment. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.Session sessions = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSessions() - { - return $this->sessions; - } - - /** - * Sessions under a given environment. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.Session sessions = 1; - * @param array<\Google\Cloud\Dataplex\V1\Session>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSessions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\Session::class); - $this->sessions = $arr; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListTasksRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListTasksRequest.php deleted file mode 100644 index cf55741d71e1..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListTasksRequest.php +++ /dev/null @@ -1,238 +0,0 @@ -google.cloud.dataplex.v1.ListTasksRequest - */ -class ListTasksRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the parent lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Maximum number of tasks to return. The service may return fewer - * than this value. If unspecified, at most 10 tasks will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. Page token received from a previous `ListZones` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListZones` must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. Filter request. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. Order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The resource name of the parent lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. Please see - * {@see DataplexServiceClient::lakeName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\ListTasksRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the parent lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * @type int $page_size - * Optional. Maximum number of tasks to return. The service may return fewer - * than this value. If unspecified, at most 10 tasks will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. - * @type string $page_token - * Optional. Page token received from a previous `ListZones` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListZones` must match the call that provided the page token. - * @type string $filter - * Optional. Filter request. - * @type string $order_by - * Optional. Order by fields for the result. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the parent lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The resource name of the parent lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. Maximum number of tasks to return. The service may return fewer - * than this value. If unspecified, at most 10 tasks will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. Maximum number of tasks to return. The service may return fewer - * than this value. If unspecified, at most 10 tasks will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. Page token received from a previous `ListZones` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListZones` must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. Page token received from a previous `ListZones` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListZones` must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Optional. Filter request. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. Filter request. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Optional. Order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. Order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListTasksResponse.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListTasksResponse.php deleted file mode 100644 index 1adb1c8897d6..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListTasksResponse.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.dataplex.v1.ListTasksResponse - */ -class ListTasksResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Tasks under the given parent lake. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.Task tasks = 1; - */ - private $tasks; - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable_locations = 3; - */ - private $unreachable_locations; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Dataplex\V1\Task>|\Google\Protobuf\Internal\RepeatedField $tasks - * Tasks under the given parent lake. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable_locations - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Tasks under the given parent lake. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.Task tasks = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTasks() - { - return $this->tasks; - } - - /** - * Tasks under the given parent lake. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.Task tasks = 1; - * @param array<\Google\Cloud\Dataplex\V1\Task>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTasks($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\Task::class); - $this->tasks = $arr; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable_locations = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachableLocations() - { - return $this->unreachable_locations; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable_locations = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachableLocations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable_locations = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListZoneActionsRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListZoneActionsRequest.php deleted file mode 100644 index 5a9b823e9b99..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListZoneActionsRequest.php +++ /dev/null @@ -1,174 +0,0 @@ -google.cloud.dataplex.v1.ListZoneActionsRequest - */ -class ListZoneActionsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Maximum number of actions to return. The service may return fewer - * than this value. If unspecified, at most 10 actions will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. Page token received from a previous `ListZoneActions` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListZoneActions` must match the call that provided - * the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The resource name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. Please see - * {@see DataplexServiceClient::zoneName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\ListZoneActionsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * @type int $page_size - * Optional. Maximum number of actions to return. The service may return fewer - * than this value. If unspecified, at most 10 actions will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. - * @type string $page_token - * Optional. Page token received from a previous `ListZoneActions` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListZoneActions` must match the call that provided - * the page token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The resource name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. Maximum number of actions to return. The service may return fewer - * than this value. If unspecified, at most 10 actions will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. Maximum number of actions to return. The service may return fewer - * than this value. If unspecified, at most 10 actions will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. Page token received from a previous `ListZoneActions` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListZoneActions` must match the call that provided - * the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. Page token received from a previous `ListZoneActions` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `ListZoneActions` must match the call that provided - * the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListZonesRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListZonesRequest.php deleted file mode 100644 index 7357a9f6e6c2..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListZonesRequest.php +++ /dev/null @@ -1,238 +0,0 @@ -google.cloud.dataplex.v1.ListZonesRequest - */ -class ListZonesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the parent lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Maximum number of zones to return. The service may return fewer - * than this value. If unspecified, at most 10 zones will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. Page token received from a previous `ListZones` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListZones` must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. Filter request. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. Order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The resource name of the parent lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. Please see - * {@see DataplexServiceClient::lakeName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\ListZonesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the parent lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * @type int $page_size - * Optional. Maximum number of zones to return. The service may return fewer - * than this value. If unspecified, at most 10 zones will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. - * @type string $page_token - * Optional. Page token received from a previous `ListZones` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListZones` must match the call that provided the page token. - * @type string $filter - * Optional. Filter request. - * @type string $order_by - * Optional. Order by fields for the result. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the parent lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The resource name of the parent lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. Maximum number of zones to return. The service may return fewer - * than this value. If unspecified, at most 10 zones will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. Maximum number of zones to return. The service may return fewer - * than this value. If unspecified, at most 10 zones will be returned. The - * maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. Page token received from a previous `ListZones` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListZones` must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. Page token received from a previous `ListZones` call. Provide - * this to retrieve the subsequent page. When paginating, all other parameters - * provided to `ListZones` must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Optional. Filter request. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. Filter request. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Optional. Order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. Order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListZonesResponse.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListZonesResponse.php deleted file mode 100644 index 93963cfdc21b..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ListZonesResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.dataplex.v1.ListZonesResponse - */ -class ListZonesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Zones under the given parent lake. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.Zone zones = 1; - */ - private $zones; - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Dataplex\V1\Zone>|\Google\Protobuf\Internal\RepeatedField $zones - * Zones under the given parent lake. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Zones under the given parent lake. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.Zone zones = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getZones() - { - return $this->zones; - } - - /** - * Zones under the given parent lake. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.Zone zones = 1; - * @param array<\Google\Cloud\Dataplex\V1\Zone>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setZones($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\Zone::class); - $this->zones = $arr; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/LookupEntryRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/LookupEntryRequest.php deleted file mode 100644 index c472298bbafb..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/LookupEntryRequest.php +++ /dev/null @@ -1,217 +0,0 @@ -google.cloud.dataplex.v1.LookupEntryRequest - */ -class LookupEntryRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project to which the request should be attributed in the - * following form: `projects/{project}/locations/{location}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Optional. View for controlling which parts of an entry are to be returned. - * - * Generated from protobuf field .google.cloud.dataplex.v1.EntryView view = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $view = 0; - /** - * Optional. Limits the aspects returned to the provided aspect types. - * Only works if the CUSTOM view is selected. - * - * Generated from protobuf field repeated string aspect_types = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $aspect_types; - /** - * Optional. Limits the aspects returned to those associated with the provided - * paths within the Entry. Only works if the CUSTOM view is selected. - * - * Generated from protobuf field repeated string paths = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $paths; - /** - * Required. The resource name of the Entry: - * `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. - * - * Generated from protobuf field string entry = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $entry = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The project to which the request should be attributed in the - * following form: `projects/{project}/locations/{location}`. - * @type int $view - * Optional. View for controlling which parts of an entry are to be returned. - * @type array|\Google\Protobuf\Internal\RepeatedField $aspect_types - * Optional. Limits the aspects returned to the provided aspect types. - * Only works if the CUSTOM view is selected. - * @type array|\Google\Protobuf\Internal\RepeatedField $paths - * Optional. Limits the aspects returned to those associated with the provided - * paths within the Entry. Only works if the CUSTOM view is selected. - * @type string $entry - * Required. The resource name of the Entry: - * `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Catalog::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project to which the request should be attributed in the - * following form: `projects/{project}/locations/{location}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The project to which the request should be attributed in the - * following form: `projects/{project}/locations/{location}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. View for controlling which parts of an entry are to be returned. - * - * Generated from protobuf field .google.cloud.dataplex.v1.EntryView view = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getView() - { - return $this->view; - } - - /** - * Optional. View for controlling which parts of an entry are to be returned. - * - * Generated from protobuf field .google.cloud.dataplex.v1.EntryView view = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\EntryView::class); - $this->view = $var; - - return $this; - } - - /** - * Optional. Limits the aspects returned to the provided aspect types. - * Only works if the CUSTOM view is selected. - * - * Generated from protobuf field repeated string aspect_types = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAspectTypes() - { - return $this->aspect_types; - } - - /** - * Optional. Limits the aspects returned to the provided aspect types. - * Only works if the CUSTOM view is selected. - * - * Generated from protobuf field repeated string aspect_types = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAspectTypes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->aspect_types = $arr; - - return $this; - } - - /** - * Optional. Limits the aspects returned to those associated with the provided - * paths within the Entry. Only works if the CUSTOM view is selected. - * - * Generated from protobuf field repeated string paths = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPaths() - { - return $this->paths; - } - - /** - * Optional. Limits the aspects returned to those associated with the provided - * paths within the Entry. Only works if the CUSTOM view is selected. - * - * Generated from protobuf field repeated string paths = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPaths($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->paths = $arr; - - return $this; - } - - /** - * Required. The resource name of the Entry: - * `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. - * - * Generated from protobuf field string entry = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getEntry() - { - return $this->entry; - } - - /** - * Required. The resource name of the Entry: - * `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. - * - * Generated from protobuf field string entry = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setEntry($var) - { - GPBUtil::checkString($var, True); - $this->entry = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/OperationMetadata.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/OperationMetadata.php deleted file mode 100644 index a324fa95f4c8..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/OperationMetadata.php +++ /dev/null @@ -1,307 +0,0 @@ -google.cloud.dataplex.v1.OperationMetadata - */ -class OperationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $end_time = null; - /** - * Output only. Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $target = ''; - /** - * Output only. Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $verb = ''; - /** - * Output only. Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $status_message = ''; - /** - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have successfully been cancelled - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * - * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $requested_cancellation = false; - /** - * Output only. API version used to start the operation. - * - * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $api_version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time the operation was created. - * @type \Google\Protobuf\Timestamp $end_time - * Output only. The time the operation finished running. - * @type string $target - * Output only. Server-defined resource path for the target of the operation. - * @type string $verb - * Output only. Name of the verb executed by the operation. - * @type string $status_message - * Output only. Human-readable status of the operation, if any. - * @type bool $requested_cancellation - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have successfully been cancelled - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * @type string $api_version - * Output only. API version used to start the operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * Output only. The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * Output only. Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getTarget() - { - return $this->target; - } - - /** - * Output only. Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setTarget($var) - { - GPBUtil::checkString($var, True); - $this->target = $var; - - return $this; - } - - /** - * Output only. Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getVerb() - { - return $this->verb; - } - - /** - * Output only. Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setVerb($var) - { - GPBUtil::checkString($var, True); - $this->verb = $var; - - return $this; - } - - /** - * Output only. Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getStatusMessage() - { - return $this->status_message; - } - - /** - * Output only. Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setStatusMessage($var) - { - GPBUtil::checkString($var, True); - $this->status_message = $var; - - return $this; - } - - /** - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have successfully been cancelled - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * - * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getRequestedCancellation() - { - return $this->requested_cancellation; - } - - /** - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have successfully been cancelled - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * - * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setRequestedCancellation($var) - { - GPBUtil::checkBool($var); - $this->requested_cancellation = $var; - - return $this; - } - - /** - * Output only. API version used to start the operation. - * - * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getApiVersion() - { - return $this->api_version; - } - - /** - * Output only. API version used to start the operation. - * - * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setApiVersion($var) - { - GPBUtil::checkString($var, True); - $this->api_version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Partition.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Partition.php deleted file mode 100644 index 57cd119f1bb7..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Partition.php +++ /dev/null @@ -1,202 +0,0 @@ -google.cloud.dataplex.v1.Partition - */ -class Partition extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Partition values used in the HTTP URL must be - * double encoded. For example, `url_encode(url_encode(value))` can be used - * to encode "US:CA/CA#Sunnyvale so that the request URL ends - * with "/partitions/US%253ACA/CA%2523Sunnyvale". - * The name field in the response retains the encoded format. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. Immutable. The set of values representing the partition, which - * correspond to the partition schema defined in the parent entity. - * - * Generated from protobuf field repeated string values = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - */ - private $values; - /** - * Required. Immutable. The location of the entity data within the partition, - * for example, `gs://bucket/path/to/entity/key1=value1/key2=value2`. Or - * `projects//datasets//tables/` - * - * Generated from protobuf field string location = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - */ - protected $location = ''; - /** - * Optional. The etag for this partition. - * - * Generated from protobuf field string etag = 4 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * @deprecated - */ - protected $etag = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. Partition values used in the HTTP URL must be - * double encoded. For example, `url_encode(url_encode(value))` can be used - * to encode "US:CA/CA#Sunnyvale so that the request URL ends - * with "/partitions/US%253ACA/CA%2523Sunnyvale". - * The name field in the response retains the encoded format. - * @type array|\Google\Protobuf\Internal\RepeatedField $values - * Required. Immutable. The set of values representing the partition, which - * correspond to the partition schema defined in the parent entity. - * @type string $location - * Required. Immutable. The location of the entity data within the partition, - * for example, `gs://bucket/path/to/entity/key1=value1/key2=value2`. Or - * `projects//datasets//tables/` - * @type string $etag - * Optional. The etag for this partition. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Metadata::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Partition values used in the HTTP URL must be - * double encoded. For example, `url_encode(url_encode(value))` can be used - * to encode "US:CA/CA#Sunnyvale so that the request URL ends - * with "/partitions/US%253ACA/CA%2523Sunnyvale". - * The name field in the response retains the encoded format. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. Partition values used in the HTTP URL must be - * double encoded. For example, `url_encode(url_encode(value))` can be used - * to encode "US:CA/CA#Sunnyvale so that the request URL ends - * with "/partitions/US%253ACA/CA%2523Sunnyvale". - * The name field in the response retains the encoded format. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. Immutable. The set of values representing the partition, which - * correspond to the partition schema defined in the parent entity. - * - * Generated from protobuf field repeated string values = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getValues() - { - return $this->values; - } - - /** - * Required. Immutable. The set of values representing the partition, which - * correspond to the partition schema defined in the parent entity. - * - * Generated from protobuf field repeated string values = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setValues($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->values = $arr; - - return $this; - } - - /** - * Required. Immutable. The location of the entity data within the partition, - * for example, `gs://bucket/path/to/entity/key1=value1/key2=value2`. Or - * `projects//datasets//tables/` - * - * Generated from protobuf field string location = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getLocation() - { - return $this->location; - } - - /** - * Required. Immutable. The location of the entity data within the partition, - * for example, `gs://bucket/path/to/entity/key1=value1/key2=value2`. Or - * `projects//datasets//tables/` - * - * Generated from protobuf field string location = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setLocation($var) - { - GPBUtil::checkString($var, True); - $this->location = $var; - - return $this; - } - - /** - * Optional. The etag for this partition. - * - * Generated from protobuf field string etag = 4 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * @return string - * @deprecated - */ - public function getEtag() - { - @trigger_error('etag is deprecated.', E_USER_DEPRECATED); - return $this->etag; - } - - /** - * Optional. The etag for this partition. - * - * Generated from protobuf field string etag = 4 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - * @deprecated - */ - public function setEtag($var) - { - @trigger_error('etag is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ResourceAccessSpec.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ResourceAccessSpec.php deleted file mode 100644 index 21c5ac6ae057..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ResourceAccessSpec.php +++ /dev/null @@ -1,145 +0,0 @@ -google.cloud.dataplex.v1.ResourceAccessSpec - */ -class ResourceAccessSpec extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The format of strings follows the pattern followed by IAM in the - * bindings. user:{email}, serviceAccount:{email} group:{email}. - * The set of principals to be granted reader role on the resource. - * - * Generated from protobuf field repeated string readers = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $readers; - /** - * Optional. The set of principals to be granted writer role on the resource. - * - * Generated from protobuf field repeated string writers = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $writers; - /** - * Optional. The set of principals to be granted owner role on the resource. - * - * Generated from protobuf field repeated string owners = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $owners; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $readers - * Optional. The format of strings follows the pattern followed by IAM in the - * bindings. user:{email}, serviceAccount:{email} group:{email}. - * The set of principals to be granted reader role on the resource. - * @type array|\Google\Protobuf\Internal\RepeatedField $writers - * Optional. The set of principals to be granted writer role on the resource. - * @type array|\Google\Protobuf\Internal\RepeatedField $owners - * Optional. The set of principals to be granted owner role on the resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Security::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The format of strings follows the pattern followed by IAM in the - * bindings. user:{email}, serviceAccount:{email} group:{email}. - * The set of principals to be granted reader role on the resource. - * - * Generated from protobuf field repeated string readers = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getReaders() - { - return $this->readers; - } - - /** - * Optional. The format of strings follows the pattern followed by IAM in the - * bindings. user:{email}, serviceAccount:{email} group:{email}. - * The set of principals to be granted reader role on the resource. - * - * Generated from protobuf field repeated string readers = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setReaders($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->readers = $arr; - - return $this; - } - - /** - * Optional. The set of principals to be granted writer role on the resource. - * - * Generated from protobuf field repeated string writers = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getWriters() - { - return $this->writers; - } - - /** - * Optional. The set of principals to be granted writer role on the resource. - * - * Generated from protobuf field repeated string writers = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setWriters($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->writers = $arr; - - return $this; - } - - /** - * Optional. The set of principals to be granted owner role on the resource. - * - * Generated from protobuf field repeated string owners = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getOwners() - { - return $this->owners; - } - - /** - * Optional. The set of principals to be granted owner role on the resource. - * - * Generated from protobuf field repeated string owners = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setOwners($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->owners = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/RunDataScanRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/RunDataScanRequest.php deleted file mode 100644 index 1b01b86683b5..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/RunDataScanRequest.php +++ /dev/null @@ -1,102 +0,0 @@ -google.cloud.dataplex.v1.RunDataScanRequest - */ -class RunDataScanRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the DataScan: - * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}`. - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * Only **OnDemand** data scans are allowed. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The resource name of the DataScan: - * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}`. - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * - * Only **OnDemand** data scans are allowed. Please see - * {@see DataScanServiceClient::dataScanName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\RunDataScanRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the DataScan: - * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}`. - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * Only **OnDemand** data scans are allowed. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Datascans::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the DataScan: - * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}`. - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * Only **OnDemand** data scans are allowed. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the DataScan: - * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}`. - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * Only **OnDemand** data scans are allowed. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/RunDataScanResponse.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/RunDataScanResponse.php deleted file mode 100644 index 5bdc7ae1f097..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/RunDataScanResponse.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.dataplex.v1.RunDataScanResponse - */ -class RunDataScanResponse extends \Google\Protobuf\Internal\Message -{ - /** - * DataScanJob created by RunDataScan request. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScanJob job = 1; - */ - protected $job = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dataplex\V1\DataScanJob $job - * DataScanJob created by RunDataScan request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Datascans::initOnce(); - parent::__construct($data); - } - - /** - * DataScanJob created by RunDataScan request. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScanJob job = 1; - * @return \Google\Cloud\Dataplex\V1\DataScanJob|null - */ - public function getJob() - { - return $this->job; - } - - public function hasJob() - { - return isset($this->job); - } - - public function clearJob() - { - unset($this->job); - } - - /** - * DataScanJob created by RunDataScan request. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScanJob job = 1; - * @param \Google\Cloud\Dataplex\V1\DataScanJob $var - * @return $this - */ - public function setJob($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataScanJob::class); - $this->job = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/RunTaskRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/RunTaskRequest.php deleted file mode 100644 index ce2348d52af6..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/RunTaskRequest.php +++ /dev/null @@ -1,200 +0,0 @@ -google.cloud.dataplex.v1.RunTaskRequest - */ -class RunTaskRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the task: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. User-defined labels for the task. If the map is left empty, the - * task will run with existing labels from task definition. If the map - * contains an entry with a new key, the same will be added to existing set of - * labels. If the map contains an entry with an existing label key in task - * definition, the task will run with new label value for that entry. Clearing - * an existing label will require label value to be explicitly set to a hyphen - * "-". The label value cannot be empty. - * - * Generated from protobuf field map labels = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * Optional. Execution spec arguments. If the map is left empty, the task will - * run with existing execution spec args from task definition. If the map - * contains an entry with a new key, the same will be added to existing set of - * args. If the map contains an entry with an existing arg key in task - * definition, the task will run with new arg value for that entry. Clearing - * an existing arg will require arg value to be explicitly set to a hyphen - * "-". The arg value cannot be empty. - * - * Generated from protobuf field map args = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $args; - - /** - * @param string $name Required. The resource name of the task: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. Please see - * {@see DataplexServiceClient::taskName()} for help formatting this field. - * - * @return \Google\Cloud\Dataplex\V1\RunTaskRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the task: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. User-defined labels for the task. If the map is left empty, the - * task will run with existing labels from task definition. If the map - * contains an entry with a new key, the same will be added to existing set of - * labels. If the map contains an entry with an existing label key in task - * definition, the task will run with new label value for that entry. Clearing - * an existing label will require label value to be explicitly set to a hyphen - * "-". The label value cannot be empty. - * @type array|\Google\Protobuf\Internal\MapField $args - * Optional. Execution spec arguments. If the map is left empty, the task will - * run with existing execution spec args from task definition. If the map - * contains an entry with a new key, the same will be added to existing set of - * args. If the map contains an entry with an existing arg key in task - * definition, the task will run with new arg value for that entry. Clearing - * an existing arg will require arg value to be explicitly set to a hyphen - * "-". The arg value cannot be empty. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the task: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the task: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. User-defined labels for the task. If the map is left empty, the - * task will run with existing labels from task definition. If the map - * contains an entry with a new key, the same will be added to existing set of - * labels. If the map contains an entry with an existing label key in task - * definition, the task will run with new label value for that entry. Clearing - * an existing label will require label value to be explicitly set to a hyphen - * "-". The label value cannot be empty. - * - * Generated from protobuf field map labels = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. User-defined labels for the task. If the map is left empty, the - * task will run with existing labels from task definition. If the map - * contains an entry with a new key, the same will be added to existing set of - * labels. If the map contains an entry with an existing label key in task - * definition, the task will run with new label value for that entry. Clearing - * an existing label will require label value to be explicitly set to a hyphen - * "-". The label value cannot be empty. - * - * Generated from protobuf field map labels = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Optional. Execution spec arguments. If the map is left empty, the task will - * run with existing execution spec args from task definition. If the map - * contains an entry with a new key, the same will be added to existing set of - * args. If the map contains an entry with an existing arg key in task - * definition, the task will run with new arg value for that entry. Clearing - * an existing arg will require arg value to be explicitly set to a hyphen - * "-". The arg value cannot be empty. - * - * Generated from protobuf field map args = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getArgs() - { - return $this->args; - } - - /** - * Optional. Execution spec arguments. If the map is left empty, the task will - * run with existing execution spec args from task definition. If the map - * contains an entry with a new key, the same will be added to existing set of - * args. If the map contains an entry with an existing arg key in task - * definition, the task will run with new arg value for that entry. Clearing - * an existing arg will require arg value to be explicitly set to a hyphen - * "-". The arg value cannot be empty. - * - * Generated from protobuf field map args = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setArgs($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->args = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/RunTaskResponse.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/RunTaskResponse.php deleted file mode 100644 index c13e5017fcc3..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/RunTaskResponse.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.dataplex.v1.RunTaskResponse - */ -class RunTaskResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Jobs created by RunTask API. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Job job = 1; - */ - protected $job = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dataplex\V1\Job $job - * Jobs created by RunTask API. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Jobs created by RunTask API. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Job job = 1; - * @return \Google\Cloud\Dataplex\V1\Job|null - */ - public function getJob() - { - return $this->job; - } - - public function hasJob() - { - return isset($this->job); - } - - public function clearJob() - { - unset($this->job); - } - - /** - * Jobs created by RunTask API. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Job job = 1; - * @param \Google\Cloud\Dataplex\V1\Job $var - * @return $this - */ - public function setJob($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Job::class); - $this->job = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ScannedData.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ScannedData.php deleted file mode 100644 index 176ced6a4304..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ScannedData.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.dataplex.v1.ScannedData - */ -class ScannedData extends \Google\Protobuf\Internal\Message -{ - protected $data_range; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dataplex\V1\ScannedData\IncrementalField $incremental_field - * The range denoted by values of an incremental field - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Processing::initOnce(); - parent::__construct($data); - } - - /** - * The range denoted by values of an incremental field - * - * Generated from protobuf field .google.cloud.dataplex.v1.ScannedData.IncrementalField incremental_field = 1; - * @return \Google\Cloud\Dataplex\V1\ScannedData\IncrementalField|null - */ - public function getIncrementalField() - { - return $this->readOneof(1); - } - - public function hasIncrementalField() - { - return $this->hasOneof(1); - } - - /** - * The range denoted by values of an incremental field - * - * Generated from protobuf field .google.cloud.dataplex.v1.ScannedData.IncrementalField incremental_field = 1; - * @param \Google\Cloud\Dataplex\V1\ScannedData\IncrementalField $var - * @return $this - */ - public function setIncrementalField($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\ScannedData\IncrementalField::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * @return string - */ - public function getDataRange() - { - return $this->whichOneof("data_range"); - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ScannedData/IncrementalField.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ScannedData/IncrementalField.php deleted file mode 100644 index c7ea783f0481..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/ScannedData/IncrementalField.php +++ /dev/null @@ -1,142 +0,0 @@ -google.cloud.dataplex.v1.ScannedData.IncrementalField - */ -class IncrementalField extends \Google\Protobuf\Internal\Message -{ - /** - * The field that contains values which monotonically increases over time - * (e.g. a timestamp column). - * - * Generated from protobuf field string field = 1; - */ - protected $field = ''; - /** - * Value that marks the start of the range. - * - * Generated from protobuf field string start = 2; - */ - protected $start = ''; - /** - * Value that marks the end of the range. - * - * Generated from protobuf field string end = 3; - */ - protected $end = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $field - * The field that contains values which monotonically increases over time - * (e.g. a timestamp column). - * @type string $start - * Value that marks the start of the range. - * @type string $end - * Value that marks the end of the range. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Processing::initOnce(); - parent::__construct($data); - } - - /** - * The field that contains values which monotonically increases over time - * (e.g. a timestamp column). - * - * Generated from protobuf field string field = 1; - * @return string - */ - public function getField() - { - return $this->field; - } - - /** - * The field that contains values which monotonically increases over time - * (e.g. a timestamp column). - * - * Generated from protobuf field string field = 1; - * @param string $var - * @return $this - */ - public function setField($var) - { - GPBUtil::checkString($var, True); - $this->field = $var; - - return $this; - } - - /** - * Value that marks the start of the range. - * - * Generated from protobuf field string start = 2; - * @return string - */ - public function getStart() - { - return $this->start; - } - - /** - * Value that marks the start of the range. - * - * Generated from protobuf field string start = 2; - * @param string $var - * @return $this - */ - public function setStart($var) - { - GPBUtil::checkString($var, True); - $this->start = $var; - - return $this; - } - - /** - * Value that marks the end of the range. - * - * Generated from protobuf field string end = 3; - * @return string - */ - public function getEnd() - { - return $this->end; - } - - /** - * Value that marks the end of the range. - * - * Generated from protobuf field string end = 3; - * @param string $var - * @return $this - */ - public function setEnd($var) - { - GPBUtil::checkString($var, True); - $this->end = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(IncrementalField::class, \Google\Cloud\Dataplex\V1\ScannedData_IncrementalField::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Schema.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Schema.php deleted file mode 100644 index 40081aed1552..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Schema.php +++ /dev/null @@ -1,221 +0,0 @@ -google.cloud.dataplex.v1.Schema - */ -class Schema extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Set to `true` if user-managed or `false` if managed by Dataplex. - * The default is `false` (managed by Dataplex). - * - Set to `false`to enable Dataplex discovery to update the schema. - * including new data discovery, schema inference, and schema evolution. - * Users retain the ability to input and edit the schema. Dataplex - * treats schema input by the user as though produced - * by a previous Dataplex discovery operation, and it will - * evolve the schema and take action based on that treatment. - * - Set to `true` to fully manage the entity - * schema. This setting guarantees that Dataplex will not - * change schema fields. - * - * Generated from protobuf field bool user_managed = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $user_managed = false; - /** - * Optional. The sequence of fields describing data in table entities. - * **Note:** BigQuery SchemaFields are immutable. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $fields; - /** - * Optional. The sequence of fields describing the partition structure in - * entities. If this field is empty, there are no partitions within the data. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.Schema.PartitionField partition_fields = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $partition_fields; - /** - * Optional. The structure of paths containing partition data within the - * entity. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Schema.PartitionStyle partition_style = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $partition_style = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $user_managed - * Required. Set to `true` if user-managed or `false` if managed by Dataplex. - * The default is `false` (managed by Dataplex). - * - Set to `false`to enable Dataplex discovery to update the schema. - * including new data discovery, schema inference, and schema evolution. - * Users retain the ability to input and edit the schema. Dataplex - * treats schema input by the user as though produced - * by a previous Dataplex discovery operation, and it will - * evolve the schema and take action based on that treatment. - * - Set to `true` to fully manage the entity - * schema. This setting guarantees that Dataplex will not - * change schema fields. - * @type array<\Google\Cloud\Dataplex\V1\Schema\SchemaField>|\Google\Protobuf\Internal\RepeatedField $fields - * Optional. The sequence of fields describing data in table entities. - * **Note:** BigQuery SchemaFields are immutable. - * @type array<\Google\Cloud\Dataplex\V1\Schema\PartitionField>|\Google\Protobuf\Internal\RepeatedField $partition_fields - * Optional. The sequence of fields describing the partition structure in - * entities. If this field is empty, there are no partitions within the data. - * @type int $partition_style - * Optional. The structure of paths containing partition data within the - * entity. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Metadata::initOnce(); - parent::__construct($data); - } - - /** - * Required. Set to `true` if user-managed or `false` if managed by Dataplex. - * The default is `false` (managed by Dataplex). - * - Set to `false`to enable Dataplex discovery to update the schema. - * including new data discovery, schema inference, and schema evolution. - * Users retain the ability to input and edit the schema. Dataplex - * treats schema input by the user as though produced - * by a previous Dataplex discovery operation, and it will - * evolve the schema and take action based on that treatment. - * - Set to `true` to fully manage the entity - * schema. This setting guarantees that Dataplex will not - * change schema fields. - * - * Generated from protobuf field bool user_managed = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return bool - */ - public function getUserManaged() - { - return $this->user_managed; - } - - /** - * Required. Set to `true` if user-managed or `false` if managed by Dataplex. - * The default is `false` (managed by Dataplex). - * - Set to `false`to enable Dataplex discovery to update the schema. - * including new data discovery, schema inference, and schema evolution. - * Users retain the ability to input and edit the schema. Dataplex - * treats schema input by the user as though produced - * by a previous Dataplex discovery operation, and it will - * evolve the schema and take action based on that treatment. - * - Set to `true` to fully manage the entity - * schema. This setting guarantees that Dataplex will not - * change schema fields. - * - * Generated from protobuf field bool user_managed = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param bool $var - * @return $this - */ - public function setUserManaged($var) - { - GPBUtil::checkBool($var); - $this->user_managed = $var; - - return $this; - } - - /** - * Optional. The sequence of fields describing data in table entities. - * **Note:** BigQuery SchemaFields are immutable. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFields() - { - return $this->fields; - } - - /** - * Optional. The sequence of fields describing data in table entities. - * **Note:** BigQuery SchemaFields are immutable. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\Dataplex\V1\Schema\SchemaField>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFields($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\Schema\SchemaField::class); - $this->fields = $arr; - - return $this; - } - - /** - * Optional. The sequence of fields describing the partition structure in - * entities. If this field is empty, there are no partitions within the data. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.Schema.PartitionField partition_fields = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPartitionFields() - { - return $this->partition_fields; - } - - /** - * Optional. The sequence of fields describing the partition structure in - * entities. If this field is empty, there are no partitions within the data. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.Schema.PartitionField partition_fields = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\Dataplex\V1\Schema\PartitionField>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPartitionFields($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\Schema\PartitionField::class); - $this->partition_fields = $arr; - - return $this; - } - - /** - * Optional. The structure of paths containing partition data within the - * entity. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Schema.PartitionStyle partition_style = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPartitionStyle() - { - return $this->partition_style; - } - - /** - * Optional. The structure of paths containing partition data within the - * entity. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Schema.PartitionStyle partition_style = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPartitionStyle($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\Schema\PartitionStyle::class); - $this->partition_style = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Schema/Mode.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Schema/Mode.php deleted file mode 100644 index 4f737cbbce7b..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Schema/Mode.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.dataplex.v1.Schema.Mode - */ -class Mode -{ - /** - * Mode unspecified. - * - * Generated from protobuf enum MODE_UNSPECIFIED = 0; - */ - const MODE_UNSPECIFIED = 0; - /** - * The field has required semantics. - * - * Generated from protobuf enum REQUIRED = 1; - */ - const REQUIRED = 1; - /** - * The field has optional semantics, and may be null. - * - * Generated from protobuf enum NULLABLE = 2; - */ - const NULLABLE = 2; - /** - * The field has repeated (0 or more) semantics, and is a list of values. - * - * Generated from protobuf enum REPEATED = 3; - */ - const REPEATED = 3; - - private static $valueToName = [ - self::MODE_UNSPECIFIED => 'MODE_UNSPECIFIED', - self::REQUIRED => 'REQUIRED', - self::NULLABLE => 'NULLABLE', - self::REPEATED => 'REPEATED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Mode::class, \Google\Cloud\Dataplex\V1\Schema_Mode::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Schema/PartitionField.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Schema/PartitionField.php deleted file mode 100644 index 504de2911360..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Schema/PartitionField.php +++ /dev/null @@ -1,115 +0,0 @@ -google.cloud.dataplex.v1.Schema.PartitionField - */ -class PartitionField extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Partition field name must consist of letters, numbers, and - * underscores only, with a maximum of length of 256 characters, and must - * begin with a letter or underscore.. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Required. Immutable. The type of field. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Schema.Type type = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - */ - protected $type = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Partition field name must consist of letters, numbers, and - * underscores only, with a maximum of length of 256 characters, and must - * begin with a letter or underscore.. - * @type int $type - * Required. Immutable. The type of field. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Metadata::initOnce(); - parent::__construct($data); - } - - /** - * Required. Partition field name must consist of letters, numbers, and - * underscores only, with a maximum of length of 256 characters, and must - * begin with a letter or underscore.. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Partition field name must consist of letters, numbers, and - * underscores only, with a maximum of length of 256 characters, and must - * begin with a letter or underscore.. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. Immutable. The type of field. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Schema.Type type = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Required. Immutable. The type of field. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Schema.Type type = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\Schema\Type::class); - $this->type = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(PartitionField::class, \Google\Cloud\Dataplex\V1\Schema_PartitionField::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Schema/PartitionStyle.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Schema/PartitionStyle.php deleted file mode 100644 index 4162a37726fe..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Schema/PartitionStyle.php +++ /dev/null @@ -1,59 +0,0 @@ -google.cloud.dataplex.v1.Schema.PartitionStyle - */ -class PartitionStyle -{ - /** - * PartitionStyle unspecified - * - * Generated from protobuf enum PARTITION_STYLE_UNSPECIFIED = 0; - */ - const PARTITION_STYLE_UNSPECIFIED = 0; - /** - * Partitions are hive-compatible. - * Examples: `gs://bucket/path/to/table/dt=2019-10-31/lang=en`, - * `gs://bucket/path/to/table/dt=2019-10-31/lang=en/late`. - * - * Generated from protobuf enum HIVE_COMPATIBLE = 1; - */ - const HIVE_COMPATIBLE = 1; - - private static $valueToName = [ - self::PARTITION_STYLE_UNSPECIFIED => 'PARTITION_STYLE_UNSPECIFIED', - self::HIVE_COMPATIBLE => 'HIVE_COMPATIBLE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(PartitionStyle::class, \Google\Cloud\Dataplex\V1\Schema_PartitionStyle::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Schema/SchemaField.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Schema/SchemaField.php deleted file mode 100644 index 5811645ddf75..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Schema/SchemaField.php +++ /dev/null @@ -1,218 +0,0 @@ -google.cloud.dataplex.v1.Schema.SchemaField - */ -class SchemaField extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the field. Must contain only letters, numbers and - * underscores, with a maximum length of 767 characters, - * and must begin with a letter or underscore. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Optional. User friendly field description. Must be less than or equal to - * 1024 characters. - * - * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Required. The type of field. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Schema.Type type = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $type = 0; - /** - * Required. Additional field semantics. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Schema.Mode mode = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $mode = 0; - /** - * Optional. Any nested field for complex types. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $fields; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the field. Must contain only letters, numbers and - * underscores, with a maximum length of 767 characters, - * and must begin with a letter or underscore. - * @type string $description - * Optional. User friendly field description. Must be less than or equal to - * 1024 characters. - * @type int $type - * Required. The type of field. - * @type int $mode - * Required. Additional field semantics. - * @type array<\Google\Cloud\Dataplex\V1\Schema\SchemaField>|\Google\Protobuf\Internal\RepeatedField $fields - * Optional. Any nested field for complex types. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Metadata::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the field. Must contain only letters, numbers and - * underscores, with a maximum length of 767 characters, - * and must begin with a letter or underscore. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the field. Must contain only letters, numbers and - * underscores, with a maximum length of 767 characters, - * and must begin with a letter or underscore. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. User friendly field description. Must be less than or equal to - * 1024 characters. - * - * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. User friendly field description. Must be less than or equal to - * 1024 characters. - * - * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Required. The type of field. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Schema.Type type = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Required. The type of field. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Schema.Type type = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\Schema\Type::class); - $this->type = $var; - - return $this; - } - - /** - * Required. Additional field semantics. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Schema.Mode mode = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getMode() - { - return $this->mode; - } - - /** - * Required. Additional field semantics. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Schema.Mode mode = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\Schema\Mode::class); - $this->mode = $var; - - return $this; - } - - /** - * Optional. Any nested field for complex types. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFields() - { - return $this->fields; - } - - /** - * Optional. Any nested field for complex types. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\Dataplex\V1\Schema\SchemaField>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFields($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\Schema\SchemaField::class); - $this->fields = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SchemaField::class, \Google\Cloud\Dataplex\V1\Schema_SchemaField::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Schema/Type.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Schema/Type.php deleted file mode 100644 index 32335b4443a1..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Schema/Type.php +++ /dev/null @@ -1,156 +0,0 @@ -google.cloud.dataplex.v1.Schema.Type - */ -class Type -{ - /** - * SchemaType unspecified. - * - * Generated from protobuf enum TYPE_UNSPECIFIED = 0; - */ - const TYPE_UNSPECIFIED = 0; - /** - * Boolean field. - * - * Generated from protobuf enum BOOLEAN = 1; - */ - const BOOLEAN = 1; - /** - * Single byte numeric field. - * - * Generated from protobuf enum BYTE = 2; - */ - const BYTE = 2; - /** - * 16-bit numeric field. - * - * Generated from protobuf enum INT16 = 3; - */ - const INT16 = 3; - /** - * 32-bit numeric field. - * - * Generated from protobuf enum INT32 = 4; - */ - const INT32 = 4; - /** - * 64-bit numeric field. - * - * Generated from protobuf enum INT64 = 5; - */ - const INT64 = 5; - /** - * Floating point numeric field. - * - * Generated from protobuf enum FLOAT = 6; - */ - const FLOAT = 6; - /** - * Double precision numeric field. - * - * Generated from protobuf enum DOUBLE = 7; - */ - const DOUBLE = 7; - /** - * Real value numeric field. - * - * Generated from protobuf enum DECIMAL = 8; - */ - const DECIMAL = 8; - /** - * Sequence of characters field. - * - * Generated from protobuf enum STRING = 9; - */ - const STRING = 9; - /** - * Sequence of bytes field. - * - * Generated from protobuf enum BINARY = 10; - */ - const BINARY = 10; - /** - * Date and time field. - * - * Generated from protobuf enum TIMESTAMP = 11; - */ - const TIMESTAMP = 11; - /** - * Date field. - * - * Generated from protobuf enum DATE = 12; - */ - const DATE = 12; - /** - * Time field. - * - * Generated from protobuf enum TIME = 13; - */ - const TIME = 13; - /** - * Structured field. Nested fields that define the structure of the map. - * If all nested fields are nullable, this field represents a union. - * - * Generated from protobuf enum RECORD = 14; - */ - const RECORD = 14; - /** - * Null field that does not have values. - * - * Generated from protobuf enum NULL = 100; - */ - const NULL = 100; - - private static $valueToName = [ - self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', - self::BOOLEAN => 'BOOLEAN', - self::BYTE => 'BYTE', - self::INT16 => 'INT16', - self::INT32 => 'INT32', - self::INT64 => 'INT64', - self::FLOAT => 'FLOAT', - self::DOUBLE => 'DOUBLE', - self::DECIMAL => 'DECIMAL', - self::STRING => 'STRING', - self::BINARY => 'BINARY', - self::TIMESTAMP => 'TIMESTAMP', - self::DATE => 'DATE', - self::TIME => 'TIME', - self::RECORD => 'RECORD', - self::NULL => 'NULL', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Type::class, \Google\Cloud\Dataplex\V1\Schema_Type::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/SearchEntriesRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/SearchEntriesRequest.php deleted file mode 100644 index fc19ada6019b..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/SearchEntriesRequest.php +++ /dev/null @@ -1,260 +0,0 @@ -google.cloud.dataplex.v1.SearchEntriesRequest - */ -class SearchEntriesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project to which the request should be attributed in the - * following form: `projects/{project}/locations/{location}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Required. The query against which entries in scope should be matched. - * - * Generated from protobuf field string query = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $query = ''; - /** - * Optional. Pagination. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. Ordering of the results. Supported options to be added later. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - /** - * Optional. The scope under which the search should be operating. Should - * either be organizations/ or projects/. If left - * unspecified, it will default to the organization where the project provided - * in `name` is located. - * - * Generated from protobuf field string scope = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $scope = ''; - - /** - * @param string $name Required. The project to which the request should be attributed in the - * following form: `projects/{project}/locations/{location}`. - * @param string $query Required. The query against which entries in scope should be matched. - * - * @return \Google\Cloud\Dataplex\V1\SearchEntriesRequest - * - * @experimental - */ - public static function build(string $name, string $query): self - { - return (new self()) - ->setName($name) - ->setQuery($query); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The project to which the request should be attributed in the - * following form: `projects/{project}/locations/{location}`. - * @type string $query - * Required. The query against which entries in scope should be matched. - * @type int $page_size - * Optional. Pagination. - * @type string $page_token - * @type string $order_by - * Optional. Ordering of the results. Supported options to be added later. - * @type string $scope - * Optional. The scope under which the search should be operating. Should - * either be organizations/ or projects/. If left - * unspecified, it will default to the organization where the project provided - * in `name` is located. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Catalog::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project to which the request should be attributed in the - * following form: `projects/{project}/locations/{location}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The project to which the request should be attributed in the - * following form: `projects/{project}/locations/{location}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. The query against which entries in scope should be matched. - * - * Generated from protobuf field string query = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getQuery() - { - return $this->query; - } - - /** - * Required. The query against which entries in scope should be matched. - * - * Generated from protobuf field string query = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setQuery($var) - { - GPBUtil::checkString($var, True); - $this->query = $var; - - return $this; - } - - /** - * Optional. Pagination. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. Pagination. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Optional. Ordering of the results. Supported options to be added later. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. Ordering of the results. Supported options to be added later. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - - /** - * Optional. The scope under which the search should be operating. Should - * either be organizations/ or projects/. If left - * unspecified, it will default to the organization where the project provided - * in `name` is located. - * - * Generated from protobuf field string scope = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getScope() - { - return $this->scope; - } - - /** - * Optional. The scope under which the search should be operating. Should - * either be organizations/ or projects/. If left - * unspecified, it will default to the organization where the project provided - * in `name` is located. - * - * Generated from protobuf field string scope = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setScope($var) - { - GPBUtil::checkString($var, True); - $this->scope = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/SearchEntriesResponse.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/SearchEntriesResponse.php deleted file mode 100644 index 6c428f353aaa..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/SearchEntriesResponse.php +++ /dev/null @@ -1,175 +0,0 @@ -google.cloud.dataplex.v1.SearchEntriesResponse - */ -class SearchEntriesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The results matching the search query. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.SearchEntriesResult results = 1; - */ - private $results; - /** - * The estimated total number of matching entries. Not guaranteed to be - * accurate. - * - * Generated from protobuf field int32 total_size = 2; - */ - protected $total_size = 0; - /** - * Pagination token. - * - * Generated from protobuf field string next_page_token = 3; - */ - protected $next_page_token = ''; - /** - * Unreachable locations. Search results don't include data from those - * locations. - * - * Generated from protobuf field repeated string unreachable = 4; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Dataplex\V1\SearchEntriesResult>|\Google\Protobuf\Internal\RepeatedField $results - * The results matching the search query. - * @type int $total_size - * The estimated total number of matching entries. Not guaranteed to be - * accurate. - * @type string $next_page_token - * Pagination token. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Unreachable locations. Search results don't include data from those - * locations. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Catalog::initOnce(); - parent::__construct($data); - } - - /** - * The results matching the search query. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.SearchEntriesResult results = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getResults() - { - return $this->results; - } - - /** - * The results matching the search query. - * - * Generated from protobuf field repeated .google.cloud.dataplex.v1.SearchEntriesResult results = 1; - * @param array<\Google\Cloud\Dataplex\V1\SearchEntriesResult>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setResults($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\SearchEntriesResult::class); - $this->results = $arr; - - return $this; - } - - /** - * The estimated total number of matching entries. Not guaranteed to be - * accurate. - * - * Generated from protobuf field int32 total_size = 2; - * @return int - */ - public function getTotalSize() - { - return $this->total_size; - } - - /** - * The estimated total number of matching entries. Not guaranteed to be - * accurate. - * - * Generated from protobuf field int32 total_size = 2; - * @param int $var - * @return $this - */ - public function setTotalSize($var) - { - GPBUtil::checkInt32($var); - $this->total_size = $var; - - return $this; - } - - /** - * Pagination token. - * - * Generated from protobuf field string next_page_token = 3; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Pagination token. - * - * Generated from protobuf field string next_page_token = 3; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Unreachable locations. Search results don't include data from those - * locations. - * - * Generated from protobuf field repeated string unreachable = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Unreachable locations. Search results don't include data from those - * locations. - * - * Generated from protobuf field repeated string unreachable = 4; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/SearchEntriesResult.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/SearchEntriesResult.php deleted file mode 100644 index 2466072d3f0a..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/SearchEntriesResult.php +++ /dev/null @@ -1,155 +0,0 @@ -google.cloud.dataplex.v1.SearchEntriesResult - */ -class SearchEntriesResult extends \Google\Protobuf\Internal\Message -{ - /** - * Linked resource name. - * - * Generated from protobuf field string linked_resource = 8; - */ - protected $linked_resource = ''; - /** - * Entry format of the result. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Entry dataplex_entry = 9; - */ - protected $dataplex_entry = null; - /** - * Snippets. - * - * Generated from protobuf field .google.cloud.dataplex.v1.SearchEntriesResult.Snippets snippets = 12; - */ - protected $snippets = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $linked_resource - * Linked resource name. - * @type \Google\Cloud\Dataplex\V1\Entry $dataplex_entry - * Entry format of the result. - * @type \Google\Cloud\Dataplex\V1\SearchEntriesResult\Snippets $snippets - * Snippets. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Catalog::initOnce(); - parent::__construct($data); - } - - /** - * Linked resource name. - * - * Generated from protobuf field string linked_resource = 8; - * @return string - */ - public function getLinkedResource() - { - return $this->linked_resource; - } - - /** - * Linked resource name. - * - * Generated from protobuf field string linked_resource = 8; - * @param string $var - * @return $this - */ - public function setLinkedResource($var) - { - GPBUtil::checkString($var, True); - $this->linked_resource = $var; - - return $this; - } - - /** - * Entry format of the result. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Entry dataplex_entry = 9; - * @return \Google\Cloud\Dataplex\V1\Entry|null - */ - public function getDataplexEntry() - { - return $this->dataplex_entry; - } - - public function hasDataplexEntry() - { - return isset($this->dataplex_entry); - } - - public function clearDataplexEntry() - { - unset($this->dataplex_entry); - } - - /** - * Entry format of the result. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Entry dataplex_entry = 9; - * @param \Google\Cloud\Dataplex\V1\Entry $var - * @return $this - */ - public function setDataplexEntry($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Entry::class); - $this->dataplex_entry = $var; - - return $this; - } - - /** - * Snippets. - * - * Generated from protobuf field .google.cloud.dataplex.v1.SearchEntriesResult.Snippets snippets = 12; - * @return \Google\Cloud\Dataplex\V1\SearchEntriesResult\Snippets|null - */ - public function getSnippets() - { - return $this->snippets; - } - - public function hasSnippets() - { - return isset($this->snippets); - } - - public function clearSnippets() - { - unset($this->snippets); - } - - /** - * Snippets. - * - * Generated from protobuf field .google.cloud.dataplex.v1.SearchEntriesResult.Snippets snippets = 12; - * @param \Google\Cloud\Dataplex\V1\SearchEntriesResult\Snippets $var - * @return $this - */ - public function setSnippets($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\SearchEntriesResult\Snippets::class); - $this->snippets = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/SearchEntriesResult/Snippets.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/SearchEntriesResult/Snippets.php deleted file mode 100644 index 446acdf9ef1d..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/SearchEntriesResult/Snippets.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.dataplex.v1.SearchEntriesResult.Snippets - */ -class Snippets extends \Google\Protobuf\Internal\Message -{ - /** - * Entry - * - * Generated from protobuf field .google.cloud.dataplex.v1.Entry dataplex_entry = 1; - */ - protected $dataplex_entry = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dataplex\V1\Entry $dataplex_entry - * Entry - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Catalog::initOnce(); - parent::__construct($data); - } - - /** - * Entry - * - * Generated from protobuf field .google.cloud.dataplex.v1.Entry dataplex_entry = 1; - * @return \Google\Cloud\Dataplex\V1\Entry|null - */ - public function getDataplexEntry() - { - return $this->dataplex_entry; - } - - public function hasDataplexEntry() - { - return isset($this->dataplex_entry); - } - - public function clearDataplexEntry() - { - unset($this->dataplex_entry); - } - - /** - * Entry - * - * Generated from protobuf field .google.cloud.dataplex.v1.Entry dataplex_entry = 1; - * @param \Google\Cloud\Dataplex\V1\Entry $var - * @return $this - */ - public function setDataplexEntry($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Entry::class); - $this->dataplex_entry = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Snippets::class, \Google\Cloud\Dataplex\V1\SearchEntriesResult_Snippets::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Session.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Session.php deleted file mode 100644 index e97bb288861b..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Session.php +++ /dev/null @@ -1,183 +0,0 @@ -google.cloud.dataplex.v1.Session - */ -class Session extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The relative resource name of the content, of the form: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}/sessions/{session_id} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Output only. Email of user running the session. - * - * Generated from protobuf field string user_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $user_id = ''; - /** - * Output only. Session start time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. State of Session - * - * Generated from protobuf field .google.cloud.dataplex.v1.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The relative resource name of the content, of the form: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}/sessions/{session_id} - * @type string $user_id - * Output only. Email of user running the session. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. Session start time. - * @type int $state - * Output only. State of Session - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Analyze::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The relative resource name of the content, of the form: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}/sessions/{session_id} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The relative resource name of the content, of the form: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}/sessions/{session_id} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. Email of user running the session. - * - * Generated from protobuf field string user_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUserId() - { - return $this->user_id; - } - - /** - * Output only. Email of user running the session. - * - * Generated from protobuf field string user_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUserId($var) - { - GPBUtil::checkString($var, True); - $this->user_id = $var; - - return $this; - } - - /** - * Output only. Session start time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. Session start time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. State of Session - * - * Generated from protobuf field .google.cloud.dataplex.v1.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. State of Session - * - * Generated from protobuf field .google.cloud.dataplex.v1.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\State::class); - $this->state = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/SessionEvent.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/SessionEvent.php deleted file mode 100644 index 7caa11fbef96..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/SessionEvent.php +++ /dev/null @@ -1,332 +0,0 @@ -google.cloud.dataplex.v1.SessionEvent - */ -class SessionEvent extends \Google\Protobuf\Internal\Message -{ - /** - * The log message. - * - * Generated from protobuf field string message = 1; - */ - protected $message = ''; - /** - * The information about the user that created the session. It will be the - * email address of the user. - * - * Generated from protobuf field string user_id = 2; - */ - protected $user_id = ''; - /** - * Unique identifier for the session. - * - * Generated from protobuf field string session_id = 3; - */ - protected $session_id = ''; - /** - * The type of the event. - * - * Generated from protobuf field .google.cloud.dataplex.v1.SessionEvent.EventType type = 4; - */ - protected $type = 0; - /** - * The status of the event. - * - * Generated from protobuf field bool event_succeeded = 6; - */ - protected $event_succeeded = false; - /** - * If the session is associated with an environment with fast startup enabled, - * and was created before being assigned to a user. - * - * Generated from protobuf field bool fast_startup_enabled = 7; - */ - protected $fast_startup_enabled = false; - /** - * The idle duration of a warm pooled session before it is assigned to user. - * - * Generated from protobuf field .google.protobuf.Duration unassigned_duration = 8; - */ - protected $unassigned_duration = null; - protected $detail; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $message - * The log message. - * @type string $user_id - * The information about the user that created the session. It will be the - * email address of the user. - * @type string $session_id - * Unique identifier for the session. - * @type int $type - * The type of the event. - * @type \Google\Cloud\Dataplex\V1\SessionEvent\QueryDetail $query - * The execution details of the query. - * @type bool $event_succeeded - * The status of the event. - * @type bool $fast_startup_enabled - * If the session is associated with an environment with fast startup enabled, - * and was created before being assigned to a user. - * @type \Google\Protobuf\Duration $unassigned_duration - * The idle duration of a warm pooled session before it is assigned to user. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Logs::initOnce(); - parent::__construct($data); - } - - /** - * The log message. - * - * Generated from protobuf field string message = 1; - * @return string - */ - public function getMessage() - { - return $this->message; - } - - /** - * The log message. - * - * Generated from protobuf field string message = 1; - * @param string $var - * @return $this - */ - public function setMessage($var) - { - GPBUtil::checkString($var, True); - $this->message = $var; - - return $this; - } - - /** - * The information about the user that created the session. It will be the - * email address of the user. - * - * Generated from protobuf field string user_id = 2; - * @return string - */ - public function getUserId() - { - return $this->user_id; - } - - /** - * The information about the user that created the session. It will be the - * email address of the user. - * - * Generated from protobuf field string user_id = 2; - * @param string $var - * @return $this - */ - public function setUserId($var) - { - GPBUtil::checkString($var, True); - $this->user_id = $var; - - return $this; - } - - /** - * Unique identifier for the session. - * - * Generated from protobuf field string session_id = 3; - * @return string - */ - public function getSessionId() - { - return $this->session_id; - } - - /** - * Unique identifier for the session. - * - * Generated from protobuf field string session_id = 3; - * @param string $var - * @return $this - */ - public function setSessionId($var) - { - GPBUtil::checkString($var, True); - $this->session_id = $var; - - return $this; - } - - /** - * The type of the event. - * - * Generated from protobuf field .google.cloud.dataplex.v1.SessionEvent.EventType type = 4; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * The type of the event. - * - * Generated from protobuf field .google.cloud.dataplex.v1.SessionEvent.EventType type = 4; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\SessionEvent\EventType::class); - $this->type = $var; - - return $this; - } - - /** - * The execution details of the query. - * - * Generated from protobuf field .google.cloud.dataplex.v1.SessionEvent.QueryDetail query = 5; - * @return \Google\Cloud\Dataplex\V1\SessionEvent\QueryDetail|null - */ - public function getQuery() - { - return $this->readOneof(5); - } - - public function hasQuery() - { - return $this->hasOneof(5); - } - - /** - * The execution details of the query. - * - * Generated from protobuf field .google.cloud.dataplex.v1.SessionEvent.QueryDetail query = 5; - * @param \Google\Cloud\Dataplex\V1\SessionEvent\QueryDetail $var - * @return $this - */ - public function setQuery($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\SessionEvent\QueryDetail::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * The status of the event. - * - * Generated from protobuf field bool event_succeeded = 6; - * @return bool - */ - public function getEventSucceeded() - { - return $this->event_succeeded; - } - - /** - * The status of the event. - * - * Generated from protobuf field bool event_succeeded = 6; - * @param bool $var - * @return $this - */ - public function setEventSucceeded($var) - { - GPBUtil::checkBool($var); - $this->event_succeeded = $var; - - return $this; - } - - /** - * If the session is associated with an environment with fast startup enabled, - * and was created before being assigned to a user. - * - * Generated from protobuf field bool fast_startup_enabled = 7; - * @return bool - */ - public function getFastStartupEnabled() - { - return $this->fast_startup_enabled; - } - - /** - * If the session is associated with an environment with fast startup enabled, - * and was created before being assigned to a user. - * - * Generated from protobuf field bool fast_startup_enabled = 7; - * @param bool $var - * @return $this - */ - public function setFastStartupEnabled($var) - { - GPBUtil::checkBool($var); - $this->fast_startup_enabled = $var; - - return $this; - } - - /** - * The idle duration of a warm pooled session before it is assigned to user. - * - * Generated from protobuf field .google.protobuf.Duration unassigned_duration = 8; - * @return \Google\Protobuf\Duration|null - */ - public function getUnassignedDuration() - { - return $this->unassigned_duration; - } - - public function hasUnassignedDuration() - { - return isset($this->unassigned_duration); - } - - public function clearUnassignedDuration() - { - unset($this->unassigned_duration); - } - - /** - * The idle duration of a warm pooled session before it is assigned to user. - * - * Generated from protobuf field .google.protobuf.Duration unassigned_duration = 8; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setUnassignedDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->unassigned_duration = $var; - - return $this; - } - - /** - * @return string - */ - public function getDetail() - { - return $this->whichOneof("detail"); - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/SessionEvent/EventType.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/SessionEvent/EventType.php deleted file mode 100644 index 18b401bf2f28..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/SessionEvent/EventType.php +++ /dev/null @@ -1,79 +0,0 @@ -google.cloud.dataplex.v1.SessionEvent.EventType - */ -class EventType -{ - /** - * An unspecified event type. - * - * Generated from protobuf enum EVENT_TYPE_UNSPECIFIED = 0; - */ - const EVENT_TYPE_UNSPECIFIED = 0; - /** - * Event when the session is assigned to a user. - * - * Generated from protobuf enum START = 1; - */ - const START = 1; - /** - * Event for stop of a session. - * - * Generated from protobuf enum STOP = 2; - */ - const STOP = 2; - /** - * Query events in the session. - * - * Generated from protobuf enum QUERY = 3; - */ - const QUERY = 3; - /** - * Event for creation of a cluster. It is not yet assigned to a user. - * This comes before START in the sequence - * - * Generated from protobuf enum CREATE = 4; - */ - const CREATE = 4; - - private static $valueToName = [ - self::EVENT_TYPE_UNSPECIFIED => 'EVENT_TYPE_UNSPECIFIED', - self::START => 'START', - self::STOP => 'STOP', - self::QUERY => 'QUERY', - self::CREATE => 'CREATE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(EventType::class, \Google\Cloud\Dataplex\V1\SessionEvent_EventType::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/SessionEvent/QueryDetail.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/SessionEvent/QueryDetail.php deleted file mode 100644 index 8b5a97c33ce8..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/SessionEvent/QueryDetail.php +++ /dev/null @@ -1,250 +0,0 @@ -google.cloud.dataplex.v1.SessionEvent.QueryDetail - */ -class QueryDetail extends \Google\Protobuf\Internal\Message -{ - /** - * The unique Query id identifying the query. - * - * Generated from protobuf field string query_id = 1; - */ - protected $query_id = ''; - /** - * The query text executed. - * - * Generated from protobuf field string query_text = 2; - */ - protected $query_text = ''; - /** - * Query Execution engine. - * - * Generated from protobuf field .google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine engine = 3; - */ - protected $engine = 0; - /** - * Time taken for execution of the query. - * - * Generated from protobuf field .google.protobuf.Duration duration = 4; - */ - protected $duration = null; - /** - * The size of results the query produced. - * - * Generated from protobuf field int64 result_size_bytes = 5; - */ - protected $result_size_bytes = 0; - /** - * The data processed by the query. - * - * Generated from protobuf field int64 data_processed_bytes = 6; - */ - protected $data_processed_bytes = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $query_id - * The unique Query id identifying the query. - * @type string $query_text - * The query text executed. - * @type int $engine - * Query Execution engine. - * @type \Google\Protobuf\Duration $duration - * Time taken for execution of the query. - * @type int|string $result_size_bytes - * The size of results the query produced. - * @type int|string $data_processed_bytes - * The data processed by the query. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Logs::initOnce(); - parent::__construct($data); - } - - /** - * The unique Query id identifying the query. - * - * Generated from protobuf field string query_id = 1; - * @return string - */ - public function getQueryId() - { - return $this->query_id; - } - - /** - * The unique Query id identifying the query. - * - * Generated from protobuf field string query_id = 1; - * @param string $var - * @return $this - */ - public function setQueryId($var) - { - GPBUtil::checkString($var, True); - $this->query_id = $var; - - return $this; - } - - /** - * The query text executed. - * - * Generated from protobuf field string query_text = 2; - * @return string - */ - public function getQueryText() - { - return $this->query_text; - } - - /** - * The query text executed. - * - * Generated from protobuf field string query_text = 2; - * @param string $var - * @return $this - */ - public function setQueryText($var) - { - GPBUtil::checkString($var, True); - $this->query_text = $var; - - return $this; - } - - /** - * Query Execution engine. - * - * Generated from protobuf field .google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine engine = 3; - * @return int - */ - public function getEngine() - { - return $this->engine; - } - - /** - * Query Execution engine. - * - * Generated from protobuf field .google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine engine = 3; - * @param int $var - * @return $this - */ - public function setEngine($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\SessionEvent\QueryDetail\Engine::class); - $this->engine = $var; - - return $this; - } - - /** - * Time taken for execution of the query. - * - * Generated from protobuf field .google.protobuf.Duration duration = 4; - * @return \Google\Protobuf\Duration|null - */ - public function getDuration() - { - return $this->duration; - } - - public function hasDuration() - { - return isset($this->duration); - } - - public function clearDuration() - { - unset($this->duration); - } - - /** - * Time taken for execution of the query. - * - * Generated from protobuf field .google.protobuf.Duration duration = 4; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->duration = $var; - - return $this; - } - - /** - * The size of results the query produced. - * - * Generated from protobuf field int64 result_size_bytes = 5; - * @return int|string - */ - public function getResultSizeBytes() - { - return $this->result_size_bytes; - } - - /** - * The size of results the query produced. - * - * Generated from protobuf field int64 result_size_bytes = 5; - * @param int|string $var - * @return $this - */ - public function setResultSizeBytes($var) - { - GPBUtil::checkInt64($var); - $this->result_size_bytes = $var; - - return $this; - } - - /** - * The data processed by the query. - * - * Generated from protobuf field int64 data_processed_bytes = 6; - * @return int|string - */ - public function getDataProcessedBytes() - { - return $this->data_processed_bytes; - } - - /** - * The data processed by the query. - * - * Generated from protobuf field int64 data_processed_bytes = 6; - * @param int|string $var - * @return $this - */ - public function setDataProcessedBytes($var) - { - GPBUtil::checkInt64($var); - $this->data_processed_bytes = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(QueryDetail::class, \Google\Cloud\Dataplex\V1\SessionEvent_QueryDetail::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/SessionEvent/QueryDetail/Engine.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/SessionEvent/QueryDetail/Engine.php deleted file mode 100644 index 6f64026a6ac4..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/SessionEvent/QueryDetail/Engine.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.dataplex.v1.SessionEvent.QueryDetail.Engine - */ -class Engine -{ - /** - * An unspecified Engine type. - * - * Generated from protobuf enum ENGINE_UNSPECIFIED = 0; - */ - const ENGINE_UNSPECIFIED = 0; - /** - * Spark-sql engine is specified in Query. - * - * Generated from protobuf enum SPARK_SQL = 1; - */ - const SPARK_SQL = 1; - /** - * BigQuery engine is specified in Query. - * - * Generated from protobuf enum BIGQUERY = 2; - */ - const BIGQUERY = 2; - - private static $valueToName = [ - self::ENGINE_UNSPECIFIED => 'ENGINE_UNSPECIFIED', - self::SPARK_SQL => 'SPARK_SQL', - self::BIGQUERY => 'BIGQUERY', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Engine::class, \Google\Cloud\Dataplex\V1\SessionEvent_QueryDetail_Engine::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/State.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/State.php deleted file mode 100644 index 1bd046ff27a4..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/State.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.dataplex.v1.State - */ -class State -{ - /** - * State is not specified. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Resource is active, i.e., ready to use. - * - * Generated from protobuf enum ACTIVE = 1; - */ - const ACTIVE = 1; - /** - * Resource is under creation. - * - * Generated from protobuf enum CREATING = 2; - */ - const CREATING = 2; - /** - * Resource is under deletion. - * - * Generated from protobuf enum DELETING = 3; - */ - const DELETING = 3; - /** - * Resource is active but has unresolved actions. - * - * Generated from protobuf enum ACTION_REQUIRED = 4; - */ - const ACTION_REQUIRED = 4; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::ACTIVE => 'ACTIVE', - self::CREATING => 'CREATING', - self::DELETING => 'DELETING', - self::ACTION_REQUIRED => 'ACTION_REQUIRED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageAccess.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageAccess.php deleted file mode 100644 index 45665e6e1936..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageAccess.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.dataplex.v1.StorageAccess - */ -class StorageAccess extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Describes the read access mechanism of the data. Not user - * settable. - * - * Generated from protobuf field .google.cloud.dataplex.v1.StorageAccess.AccessMode read = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $read = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $read - * Output only. Describes the read access mechanism of the data. Not user - * settable. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Metadata::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Describes the read access mechanism of the data. Not user - * settable. - * - * Generated from protobuf field .google.cloud.dataplex.v1.StorageAccess.AccessMode read = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getRead() - { - return $this->read; - } - - /** - * Output only. Describes the read access mechanism of the data. Not user - * settable. - * - * Generated from protobuf field .google.cloud.dataplex.v1.StorageAccess.AccessMode read = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setRead($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\StorageAccess\AccessMode::class); - $this->read = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageAccess/AccessMode.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageAccess/AccessMode.php deleted file mode 100644 index 94316b5dfff7..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageAccess/AccessMode.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.dataplex.v1.StorageAccess.AccessMode - */ -class AccessMode -{ - /** - * Access mode unspecified. - * - * Generated from protobuf enum ACCESS_MODE_UNSPECIFIED = 0; - */ - const ACCESS_MODE_UNSPECIFIED = 0; - /** - * Default. Data is accessed directly using storage APIs. - * - * Generated from protobuf enum DIRECT = 1; - */ - const DIRECT = 1; - /** - * Data is accessed through a managed interface using BigQuery APIs. - * - * Generated from protobuf enum MANAGED = 2; - */ - const MANAGED = 2; - - private static $valueToName = [ - self::ACCESS_MODE_UNSPECIFIED => 'ACCESS_MODE_UNSPECIFIED', - self::DIRECT => 'DIRECT', - self::MANAGED => 'MANAGED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(AccessMode::class, \Google\Cloud\Dataplex\V1\StorageAccess_AccessMode::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageFormat.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageFormat.php deleted file mode 100644 index 8b8964f3d7a6..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageFormat.php +++ /dev/null @@ -1,311 +0,0 @@ -google.cloud.dataplex.v1.StorageFormat - */ -class StorageFormat extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The data format associated with the stored data, which - * represents content type values. The value is inferred from mime type. - * - * Generated from protobuf field .google.cloud.dataplex.v1.StorageFormat.Format format = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $format = 0; - /** - * Optional. The compression type associated with the stored data. - * If unspecified, the data is uncompressed. - * - * Generated from protobuf field .google.cloud.dataplex.v1.StorageFormat.CompressionFormat compression_format = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $compression_format = 0; - /** - * Required. The mime type descriptor for the data. Must match the pattern - * {type}/{subtype}. Supported values: - * - application/x-parquet - * - application/x-avro - * - application/x-orc - * - application/x-tfrecord - * - application/x-parquet+iceberg - * - application/x-avro+iceberg - * - application/x-orc+iceberg - * - application/json - * - application/{subtypes} - * - text/csv - * - text/ - * - image/{image subtype} - * - video/{video subtype} - * - audio/{audio subtype} - * - * Generated from protobuf field string mime_type = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $mime_type = ''; - protected $options; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $format - * Output only. The data format associated with the stored data, which - * represents content type values. The value is inferred from mime type. - * @type int $compression_format - * Optional. The compression type associated with the stored data. - * If unspecified, the data is uncompressed. - * @type string $mime_type - * Required. The mime type descriptor for the data. Must match the pattern - * {type}/{subtype}. Supported values: - * - application/x-parquet - * - application/x-avro - * - application/x-orc - * - application/x-tfrecord - * - application/x-parquet+iceberg - * - application/x-avro+iceberg - * - application/x-orc+iceberg - * - application/json - * - application/{subtypes} - * - text/csv - * - text/ - * - image/{image subtype} - * - video/{video subtype} - * - audio/{audio subtype} - * @type \Google\Cloud\Dataplex\V1\StorageFormat\CsvOptions $csv - * Optional. Additional information about CSV formatted data. - * @type \Google\Cloud\Dataplex\V1\StorageFormat\JsonOptions $json - * Optional. Additional information about CSV formatted data. - * @type \Google\Cloud\Dataplex\V1\StorageFormat\IcebergOptions $iceberg - * Optional. Additional information about iceberg tables. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Metadata::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The data format associated with the stored data, which - * represents content type values. The value is inferred from mime type. - * - * Generated from protobuf field .google.cloud.dataplex.v1.StorageFormat.Format format = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getFormat() - { - return $this->format; - } - - /** - * Output only. The data format associated with the stored data, which - * represents content type values. The value is inferred from mime type. - * - * Generated from protobuf field .google.cloud.dataplex.v1.StorageFormat.Format format = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setFormat($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\StorageFormat\Format::class); - $this->format = $var; - - return $this; - } - - /** - * Optional. The compression type associated with the stored data. - * If unspecified, the data is uncompressed. - * - * Generated from protobuf field .google.cloud.dataplex.v1.StorageFormat.CompressionFormat compression_format = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getCompressionFormat() - { - return $this->compression_format; - } - - /** - * Optional. The compression type associated with the stored data. - * If unspecified, the data is uncompressed. - * - * Generated from protobuf field .google.cloud.dataplex.v1.StorageFormat.CompressionFormat compression_format = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setCompressionFormat($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\StorageFormat\CompressionFormat::class); - $this->compression_format = $var; - - return $this; - } - - /** - * Required. The mime type descriptor for the data. Must match the pattern - * {type}/{subtype}. Supported values: - * - application/x-parquet - * - application/x-avro - * - application/x-orc - * - application/x-tfrecord - * - application/x-parquet+iceberg - * - application/x-avro+iceberg - * - application/x-orc+iceberg - * - application/json - * - application/{subtypes} - * - text/csv - * - text/ - * - image/{image subtype} - * - video/{video subtype} - * - audio/{audio subtype} - * - * Generated from protobuf field string mime_type = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getMimeType() - { - return $this->mime_type; - } - - /** - * Required. The mime type descriptor for the data. Must match the pattern - * {type}/{subtype}. Supported values: - * - application/x-parquet - * - application/x-avro - * - application/x-orc - * - application/x-tfrecord - * - application/x-parquet+iceberg - * - application/x-avro+iceberg - * - application/x-orc+iceberg - * - application/json - * - application/{subtypes} - * - text/csv - * - text/ - * - image/{image subtype} - * - video/{video subtype} - * - audio/{audio subtype} - * - * Generated from protobuf field string mime_type = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setMimeType($var) - { - GPBUtil::checkString($var, True); - $this->mime_type = $var; - - return $this; - } - - /** - * Optional. Additional information about CSV formatted data. - * - * Generated from protobuf field .google.cloud.dataplex.v1.StorageFormat.CsvOptions csv = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataplex\V1\StorageFormat\CsvOptions|null - */ - public function getCsv() - { - return $this->readOneof(10); - } - - public function hasCsv() - { - return $this->hasOneof(10); - } - - /** - * Optional. Additional information about CSV formatted data. - * - * Generated from protobuf field .google.cloud.dataplex.v1.StorageFormat.CsvOptions csv = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataplex\V1\StorageFormat\CsvOptions $var - * @return $this - */ - public function setCsv($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\StorageFormat\CsvOptions::class); - $this->writeOneof(10, $var); - - return $this; - } - - /** - * Optional. Additional information about CSV formatted data. - * - * Generated from protobuf field .google.cloud.dataplex.v1.StorageFormat.JsonOptions json = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataplex\V1\StorageFormat\JsonOptions|null - */ - public function getJson() - { - return $this->readOneof(11); - } - - public function hasJson() - { - return $this->hasOneof(11); - } - - /** - * Optional. Additional information about CSV formatted data. - * - * Generated from protobuf field .google.cloud.dataplex.v1.StorageFormat.JsonOptions json = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataplex\V1\StorageFormat\JsonOptions $var - * @return $this - */ - public function setJson($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\StorageFormat\JsonOptions::class); - $this->writeOneof(11, $var); - - return $this; - } - - /** - * Optional. Additional information about iceberg tables. - * - * Generated from protobuf field .google.cloud.dataplex.v1.StorageFormat.IcebergOptions iceberg = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataplex\V1\StorageFormat\IcebergOptions|null - */ - public function getIceberg() - { - return $this->readOneof(12); - } - - public function hasIceberg() - { - return $this->hasOneof(12); - } - - /** - * Optional. Additional information about iceberg tables. - * - * Generated from protobuf field .google.cloud.dataplex.v1.StorageFormat.IcebergOptions iceberg = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataplex\V1\StorageFormat\IcebergOptions $var - * @return $this - */ - public function setIceberg($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\StorageFormat\IcebergOptions::class); - $this->writeOneof(12, $var); - - return $this; - } - - /** - * @return string - */ - public function getOptions() - { - return $this->whichOneof("options"); - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageFormat/CompressionFormat.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageFormat/CompressionFormat.php deleted file mode 100644 index fa802d137dae..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageFormat/CompressionFormat.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.dataplex.v1.StorageFormat.CompressionFormat - */ -class CompressionFormat -{ - /** - * CompressionFormat unspecified. Implies uncompressed data. - * - * Generated from protobuf enum COMPRESSION_FORMAT_UNSPECIFIED = 0; - */ - const COMPRESSION_FORMAT_UNSPECIFIED = 0; - /** - * GZip compressed set of files. - * - * Generated from protobuf enum GZIP = 2; - */ - const GZIP = 2; - /** - * BZip2 compressed set of files. - * - * Generated from protobuf enum BZIP2 = 3; - */ - const BZIP2 = 3; - - private static $valueToName = [ - self::COMPRESSION_FORMAT_UNSPECIFIED => 'COMPRESSION_FORMAT_UNSPECIFIED', - self::GZIP => 'GZIP', - self::BZIP2 => 'BZIP2', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CompressionFormat::class, \Google\Cloud\Dataplex\V1\StorageFormat_CompressionFormat::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageFormat/CsvOptions.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageFormat/CsvOptions.php deleted file mode 100644 index 003e9f882b4f..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageFormat/CsvOptions.php +++ /dev/null @@ -1,188 +0,0 @@ -google.cloud.dataplex.v1.StorageFormat.CsvOptions - */ -class CsvOptions extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The character encoding of the data. Accepts "US-ASCII", - * "UTF-8", and "ISO-8859-1". Defaults to UTF-8 if unspecified. - * - * Generated from protobuf field string encoding = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $encoding = ''; - /** - * Optional. The number of rows to interpret as header rows that should be - * skipped when reading data rows. Defaults to 0. - * - * Generated from protobuf field int32 header_rows = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $header_rows = 0; - /** - * Optional. The delimiter used to separate values. Defaults to ','. - * - * Generated from protobuf field string delimiter = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $delimiter = ''; - /** - * Optional. The character used to quote column values. Accepts '"' - * (double quotation mark) or ''' (single quotation mark). Defaults to - * '"' (double quotation mark) if unspecified. - * - * Generated from protobuf field string quote = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $quote = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $encoding - * Optional. The character encoding of the data. Accepts "US-ASCII", - * "UTF-8", and "ISO-8859-1". Defaults to UTF-8 if unspecified. - * @type int $header_rows - * Optional. The number of rows to interpret as header rows that should be - * skipped when reading data rows. Defaults to 0. - * @type string $delimiter - * Optional. The delimiter used to separate values. Defaults to ','. - * @type string $quote - * Optional. The character used to quote column values. Accepts '"' - * (double quotation mark) or ''' (single quotation mark). Defaults to - * '"' (double quotation mark) if unspecified. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Metadata::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The character encoding of the data. Accepts "US-ASCII", - * "UTF-8", and "ISO-8859-1". Defaults to UTF-8 if unspecified. - * - * Generated from protobuf field string encoding = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getEncoding() - { - return $this->encoding; - } - - /** - * Optional. The character encoding of the data. Accepts "US-ASCII", - * "UTF-8", and "ISO-8859-1". Defaults to UTF-8 if unspecified. - * - * Generated from protobuf field string encoding = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setEncoding($var) - { - GPBUtil::checkString($var, True); - $this->encoding = $var; - - return $this; - } - - /** - * Optional. The number of rows to interpret as header rows that should be - * skipped when reading data rows. Defaults to 0. - * - * Generated from protobuf field int32 header_rows = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getHeaderRows() - { - return $this->header_rows; - } - - /** - * Optional. The number of rows to interpret as header rows that should be - * skipped when reading data rows. Defaults to 0. - * - * Generated from protobuf field int32 header_rows = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setHeaderRows($var) - { - GPBUtil::checkInt32($var); - $this->header_rows = $var; - - return $this; - } - - /** - * Optional. The delimiter used to separate values. Defaults to ','. - * - * Generated from protobuf field string delimiter = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDelimiter() - { - return $this->delimiter; - } - - /** - * Optional. The delimiter used to separate values. Defaults to ','. - * - * Generated from protobuf field string delimiter = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDelimiter($var) - { - GPBUtil::checkString($var, True); - $this->delimiter = $var; - - return $this; - } - - /** - * Optional. The character used to quote column values. Accepts '"' - * (double quotation mark) or ''' (single quotation mark). Defaults to - * '"' (double quotation mark) if unspecified. - * - * Generated from protobuf field string quote = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getQuote() - { - return $this->quote; - } - - /** - * Optional. The character used to quote column values. Accepts '"' - * (double quotation mark) or ''' (single quotation mark). Defaults to - * '"' (double quotation mark) if unspecified. - * - * Generated from protobuf field string quote = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setQuote($var) - { - GPBUtil::checkString($var, True); - $this->quote = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CsvOptions::class, \Google\Cloud\Dataplex\V1\StorageFormat_CsvOptions::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageFormat/Format.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageFormat/Format.php deleted file mode 100644 index 3ac0249405c8..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageFormat/Format.php +++ /dev/null @@ -1,134 +0,0 @@ -google.cloud.dataplex.v1.StorageFormat.Format - */ -class Format -{ - /** - * Format unspecified. - * - * Generated from protobuf enum FORMAT_UNSPECIFIED = 0; - */ - const FORMAT_UNSPECIFIED = 0; - /** - * Parquet-formatted structured data. - * - * Generated from protobuf enum PARQUET = 1; - */ - const PARQUET = 1; - /** - * Avro-formatted structured data. - * - * Generated from protobuf enum AVRO = 2; - */ - const AVRO = 2; - /** - * Orc-formatted structured data. - * - * Generated from protobuf enum ORC = 3; - */ - const ORC = 3; - /** - * Csv-formatted semi-structured data. - * - * Generated from protobuf enum CSV = 100; - */ - const CSV = 100; - /** - * Json-formatted semi-structured data. - * - * Generated from protobuf enum JSON = 101; - */ - const JSON = 101; - /** - * Image data formats (such as jpg and png). - * - * Generated from protobuf enum IMAGE = 200; - */ - const IMAGE = 200; - /** - * Audio data formats (such as mp3, and wav). - * - * Generated from protobuf enum AUDIO = 201; - */ - const AUDIO = 201; - /** - * Video data formats (such as mp4 and mpg). - * - * Generated from protobuf enum VIDEO = 202; - */ - const VIDEO = 202; - /** - * Textual data formats (such as txt and xml). - * - * Generated from protobuf enum TEXT = 203; - */ - const TEXT = 203; - /** - * TensorFlow record format. - * - * Generated from protobuf enum TFRECORD = 204; - */ - const TFRECORD = 204; - /** - * Data that doesn't match a specific format. - * - * Generated from protobuf enum OTHER = 1000; - */ - const OTHER = 1000; - /** - * Data of an unknown format. - * - * Generated from protobuf enum UNKNOWN = 1001; - */ - const UNKNOWN = 1001; - - private static $valueToName = [ - self::FORMAT_UNSPECIFIED => 'FORMAT_UNSPECIFIED', - self::PARQUET => 'PARQUET', - self::AVRO => 'AVRO', - self::ORC => 'ORC', - self::CSV => 'CSV', - self::JSON => 'JSON', - self::IMAGE => 'IMAGE', - self::AUDIO => 'AUDIO', - self::VIDEO => 'VIDEO', - self::TEXT => 'TEXT', - self::TFRECORD => 'TFRECORD', - self::OTHER => 'OTHER', - self::UNKNOWN => 'UNKNOWN', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Format::class, \Google\Cloud\Dataplex\V1\StorageFormat_Format::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageFormat/IcebergOptions.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageFormat/IcebergOptions.php deleted file mode 100644 index 7470657b6049..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageFormat/IcebergOptions.php +++ /dev/null @@ -1,74 +0,0 @@ -google.cloud.dataplex.v1.StorageFormat.IcebergOptions - */ -class IcebergOptions extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The location of where the iceberg metadata is present, must be - * within the table path - * - * Generated from protobuf field string metadata_location = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $metadata_location = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $metadata_location - * Optional. The location of where the iceberg metadata is present, must be - * within the table path - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Metadata::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The location of where the iceberg metadata is present, must be - * within the table path - * - * Generated from protobuf field string metadata_location = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getMetadataLocation() - { - return $this->metadata_location; - } - - /** - * Optional. The location of where the iceberg metadata is present, must be - * within the table path - * - * Generated from protobuf field string metadata_location = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setMetadataLocation($var) - { - GPBUtil::checkString($var, True); - $this->metadata_location = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(IcebergOptions::class, \Google\Cloud\Dataplex\V1\StorageFormat_IcebergOptions::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageFormat/JsonOptions.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageFormat/JsonOptions.php deleted file mode 100644 index 177947e65192..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageFormat/JsonOptions.php +++ /dev/null @@ -1,74 +0,0 @@ -google.cloud.dataplex.v1.StorageFormat.JsonOptions - */ -class JsonOptions extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The character encoding of the data. Accepts "US-ASCII", "UTF-8" - * and "ISO-8859-1". Defaults to UTF-8 if not specified. - * - * Generated from protobuf field string encoding = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $encoding = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $encoding - * Optional. The character encoding of the data. Accepts "US-ASCII", "UTF-8" - * and "ISO-8859-1". Defaults to UTF-8 if not specified. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Metadata::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The character encoding of the data. Accepts "US-ASCII", "UTF-8" - * and "ISO-8859-1". Defaults to UTF-8 if not specified. - * - * Generated from protobuf field string encoding = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getEncoding() - { - return $this->encoding; - } - - /** - * Optional. The character encoding of the data. Accepts "US-ASCII", "UTF-8" - * and "ISO-8859-1". Defaults to UTF-8 if not specified. - * - * Generated from protobuf field string encoding = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setEncoding($var) - { - GPBUtil::checkString($var, True); - $this->encoding = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(JsonOptions::class, \Google\Cloud\Dataplex\V1\StorageFormat_JsonOptions::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageSystem.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageSystem.php deleted file mode 100644 index e5483839dc93..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/StorageSystem.php +++ /dev/null @@ -1,61 +0,0 @@ -google.cloud.dataplex.v1.StorageSystem - */ -class StorageSystem -{ - /** - * Storage system unspecified. - * - * Generated from protobuf enum STORAGE_SYSTEM_UNSPECIFIED = 0; - */ - const STORAGE_SYSTEM_UNSPECIFIED = 0; - /** - * The entity data is contained within a Cloud Storage bucket. - * - * Generated from protobuf enum CLOUD_STORAGE = 1; - */ - const CLOUD_STORAGE = 1; - /** - * The entity data is contained within a BigQuery dataset. - * - * Generated from protobuf enum BIGQUERY = 2; - */ - const BIGQUERY = 2; - - private static $valueToName = [ - self::STORAGE_SYSTEM_UNSPECIFIED => 'STORAGE_SYSTEM_UNSPECIFIED', - self::CLOUD_STORAGE => 'CLOUD_STORAGE', - self::BIGQUERY => 'BIGQUERY', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task.php deleted file mode 100644 index 59b952e8fcd2..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task.php +++ /dev/null @@ -1,544 +0,0 @@ -google.cloud.dataplex.v1.Task - */ -class Task extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The relative resource name of the task, of the form: - * projects/{project_number}/locations/{location_id}/lakes/{lake_id}/ - * tasks/{task_id}. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Output only. System generated globally unique ID for the task. This ID will - * be different if the task is deleted and re-created with the same name. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - /** - * Output only. The time when the task was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time when the task was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Optional. Description of the task. - * - * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Optional. User friendly display name. - * - * Generated from protobuf field string display_name = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $display_name = ''; - /** - * Output only. Current state of the task. - * - * Generated from protobuf field .google.cloud.dataplex.v1.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Optional. User-defined labels for the task. - * - * Generated from protobuf field map labels = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * Required. Spec related to how often and when a task should be triggered. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Task.TriggerSpec trigger_spec = 100 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $trigger_spec = null; - /** - * Required. Spec related to how a task is executed. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Task.ExecutionSpec execution_spec = 101 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $execution_spec = null; - /** - * Output only. Status of the latest task executions. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Task.ExecutionStatus execution_status = 201 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $execution_status = null; - protected $config; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The relative resource name of the task, of the form: - * projects/{project_number}/locations/{location_id}/lakes/{lake_id}/ - * tasks/{task_id}. - * @type string $uid - * Output only. System generated globally unique ID for the task. This ID will - * be different if the task is deleted and re-created with the same name. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time when the task was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time when the task was last updated. - * @type string $description - * Optional. Description of the task. - * @type string $display_name - * Optional. User friendly display name. - * @type int $state - * Output only. Current state of the task. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. User-defined labels for the task. - * @type \Google\Cloud\Dataplex\V1\Task\TriggerSpec $trigger_spec - * Required. Spec related to how often and when a task should be triggered. - * @type \Google\Cloud\Dataplex\V1\Task\ExecutionSpec $execution_spec - * Required. Spec related to how a task is executed. - * @type \Google\Cloud\Dataplex\V1\Task\ExecutionStatus $execution_status - * Output only. Status of the latest task executions. - * @type \Google\Cloud\Dataplex\V1\Task\SparkTaskConfig $spark - * Config related to running custom Spark tasks. - * @type \Google\Cloud\Dataplex\V1\Task\NotebookTaskConfig $notebook - * Config related to running scheduled Notebooks. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Tasks::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The relative resource name of the task, of the form: - * projects/{project_number}/locations/{location_id}/lakes/{lake_id}/ - * tasks/{task_id}. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The relative resource name of the task, of the form: - * projects/{project_number}/locations/{location_id}/lakes/{lake_id}/ - * tasks/{task_id}. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. System generated globally unique ID for the task. This ID will - * be different if the task is deleted and re-created with the same name. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. System generated globally unique ID for the task. This ID will - * be different if the task is deleted and re-created with the same name. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - - /** - * Output only. The time when the task was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time when the task was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The time when the task was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The time when the task was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Optional. Description of the task. - * - * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. Description of the task. - * - * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Optional. User friendly display name. - * - * Generated from protobuf field string display_name = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Optional. User friendly display name. - * - * Generated from protobuf field string display_name = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Output only. Current state of the task. - * - * Generated from protobuf field .google.cloud.dataplex.v1.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. Current state of the task. - * - * Generated from protobuf field .google.cloud.dataplex.v1.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\State::class); - $this->state = $var; - - return $this; - } - - /** - * Optional. User-defined labels for the task. - * - * Generated from protobuf field map labels = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. User-defined labels for the task. - * - * Generated from protobuf field map labels = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Required. Spec related to how often and when a task should be triggered. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Task.TriggerSpec trigger_spec = 100 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataplex\V1\Task\TriggerSpec|null - */ - public function getTriggerSpec() - { - return $this->trigger_spec; - } - - public function hasTriggerSpec() - { - return isset($this->trigger_spec); - } - - public function clearTriggerSpec() - { - unset($this->trigger_spec); - } - - /** - * Required. Spec related to how often and when a task should be triggered. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Task.TriggerSpec trigger_spec = 100 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataplex\V1\Task\TriggerSpec $var - * @return $this - */ - public function setTriggerSpec($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Task\TriggerSpec::class); - $this->trigger_spec = $var; - - return $this; - } - - /** - * Required. Spec related to how a task is executed. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Task.ExecutionSpec execution_spec = 101 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataplex\V1\Task\ExecutionSpec|null - */ - public function getExecutionSpec() - { - return $this->execution_spec; - } - - public function hasExecutionSpec() - { - return isset($this->execution_spec); - } - - public function clearExecutionSpec() - { - unset($this->execution_spec); - } - - /** - * Required. Spec related to how a task is executed. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Task.ExecutionSpec execution_spec = 101 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataplex\V1\Task\ExecutionSpec $var - * @return $this - */ - public function setExecutionSpec($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Task\ExecutionSpec::class); - $this->execution_spec = $var; - - return $this; - } - - /** - * Output only. Status of the latest task executions. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Task.ExecutionStatus execution_status = 201 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Dataplex\V1\Task\ExecutionStatus|null - */ - public function getExecutionStatus() - { - return $this->execution_status; - } - - public function hasExecutionStatus() - { - return isset($this->execution_status); - } - - public function clearExecutionStatus() - { - unset($this->execution_status); - } - - /** - * Output only. Status of the latest task executions. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Task.ExecutionStatus execution_status = 201 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Dataplex\V1\Task\ExecutionStatus $var - * @return $this - */ - public function setExecutionStatus($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Task\ExecutionStatus::class); - $this->execution_status = $var; - - return $this; - } - - /** - * Config related to running custom Spark tasks. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Task.SparkTaskConfig spark = 300; - * @return \Google\Cloud\Dataplex\V1\Task\SparkTaskConfig|null - */ - public function getSpark() - { - return $this->readOneof(300); - } - - public function hasSpark() - { - return $this->hasOneof(300); - } - - /** - * Config related to running custom Spark tasks. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Task.SparkTaskConfig spark = 300; - * @param \Google\Cloud\Dataplex\V1\Task\SparkTaskConfig $var - * @return $this - */ - public function setSpark($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Task\SparkTaskConfig::class); - $this->writeOneof(300, $var); - - return $this; - } - - /** - * Config related to running scheduled Notebooks. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Task.NotebookTaskConfig notebook = 302; - * @return \Google\Cloud\Dataplex\V1\Task\NotebookTaskConfig|null - */ - public function getNotebook() - { - return $this->readOneof(302); - } - - public function hasNotebook() - { - return $this->hasOneof(302); - } - - /** - * Config related to running scheduled Notebooks. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Task.NotebookTaskConfig notebook = 302; - * @param \Google\Cloud\Dataplex\V1\Task\NotebookTaskConfig $var - * @return $this - */ - public function setNotebook($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Task\NotebookTaskConfig::class); - $this->writeOneof(302, $var); - - return $this; - } - - /** - * @return string - */ - public function getConfig() - { - return $this->whichOneof("config"); - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/ExecutionSpec.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/ExecutionSpec.php deleted file mode 100644 index 83af80d663e7..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/ExecutionSpec.php +++ /dev/null @@ -1,284 +0,0 @@ -google.cloud.dataplex.v1.Task.ExecutionSpec - */ -class ExecutionSpec extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The arguments to pass to the task. - * The args can use placeholders of the format ${placeholder} as - * part of key/value string. These will be interpolated before passing the - * args to the driver. Currently supported placeholders: - * - ${task_id} - * - ${job_time} - * To pass positional args, set the key as TASK_ARGS. The value should be a - * comma-separated string of all the positional arguments. To use a - * delimiter other than comma, refer to - * https://cloud.google.com/sdk/gcloud/reference/topic/escaping. In case of - * other keys being present in the args, then TASK_ARGS will be passed as - * the last argument. - * - * Generated from protobuf field map args = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $args; - /** - * Required. Service account to use to execute a task. - * If not provided, the default Compute service account for the project is - * used. - * - * Generated from protobuf field string service_account = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $service_account = ''; - /** - * Optional. The project in which jobs are run. By default, the project - * containing the Lake is used. If a project is provided, the - * [ExecutionSpec.service_account][google.cloud.dataplex.v1.Task.ExecutionSpec.service_account] - * must belong to this project. - * - * Generated from protobuf field string project = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $project = ''; - /** - * Optional. The maximum duration after which the job execution is expired. - * - * Generated from protobuf field .google.protobuf.Duration max_job_execution_lifetime = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $max_job_execution_lifetime = null; - /** - * Optional. The Cloud KMS key to use for encryption, of the form: - * `projects/{project_number}/locations/{location_id}/keyRings/{key-ring-name}/cryptoKeys/{key-name}`. - * - * Generated from protobuf field string kms_key = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $kms_key = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\MapField $args - * Optional. The arguments to pass to the task. - * The args can use placeholders of the format ${placeholder} as - * part of key/value string. These will be interpolated before passing the - * args to the driver. Currently supported placeholders: - * - ${task_id} - * - ${job_time} - * To pass positional args, set the key as TASK_ARGS. The value should be a - * comma-separated string of all the positional arguments. To use a - * delimiter other than comma, refer to - * https://cloud.google.com/sdk/gcloud/reference/topic/escaping. In case of - * other keys being present in the args, then TASK_ARGS will be passed as - * the last argument. - * @type string $service_account - * Required. Service account to use to execute a task. - * If not provided, the default Compute service account for the project is - * used. - * @type string $project - * Optional. The project in which jobs are run. By default, the project - * containing the Lake is used. If a project is provided, the - * [ExecutionSpec.service_account][google.cloud.dataplex.v1.Task.ExecutionSpec.service_account] - * must belong to this project. - * @type \Google\Protobuf\Duration $max_job_execution_lifetime - * Optional. The maximum duration after which the job execution is expired. - * @type string $kms_key - * Optional. The Cloud KMS key to use for encryption, of the form: - * `projects/{project_number}/locations/{location_id}/keyRings/{key-ring-name}/cryptoKeys/{key-name}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Tasks::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The arguments to pass to the task. - * The args can use placeholders of the format ${placeholder} as - * part of key/value string. These will be interpolated before passing the - * args to the driver. Currently supported placeholders: - * - ${task_id} - * - ${job_time} - * To pass positional args, set the key as TASK_ARGS. The value should be a - * comma-separated string of all the positional arguments. To use a - * delimiter other than comma, refer to - * https://cloud.google.com/sdk/gcloud/reference/topic/escaping. In case of - * other keys being present in the args, then TASK_ARGS will be passed as - * the last argument. - * - * Generated from protobuf field map args = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getArgs() - { - return $this->args; - } - - /** - * Optional. The arguments to pass to the task. - * The args can use placeholders of the format ${placeholder} as - * part of key/value string. These will be interpolated before passing the - * args to the driver. Currently supported placeholders: - * - ${task_id} - * - ${job_time} - * To pass positional args, set the key as TASK_ARGS. The value should be a - * comma-separated string of all the positional arguments. To use a - * delimiter other than comma, refer to - * https://cloud.google.com/sdk/gcloud/reference/topic/escaping. In case of - * other keys being present in the args, then TASK_ARGS will be passed as - * the last argument. - * - * Generated from protobuf field map args = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setArgs($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->args = $arr; - - return $this; - } - - /** - * Required. Service account to use to execute a task. - * If not provided, the default Compute service account for the project is - * used. - * - * Generated from protobuf field string service_account = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getServiceAccount() - { - return $this->service_account; - } - - /** - * Required. Service account to use to execute a task. - * If not provided, the default Compute service account for the project is - * used. - * - * Generated from protobuf field string service_account = 5 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setServiceAccount($var) - { - GPBUtil::checkString($var, True); - $this->service_account = $var; - - return $this; - } - - /** - * Optional. The project in which jobs are run. By default, the project - * containing the Lake is used. If a project is provided, the - * [ExecutionSpec.service_account][google.cloud.dataplex.v1.Task.ExecutionSpec.service_account] - * must belong to this project. - * - * Generated from protobuf field string project = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getProject() - { - return $this->project; - } - - /** - * Optional. The project in which jobs are run. By default, the project - * containing the Lake is used. If a project is provided, the - * [ExecutionSpec.service_account][google.cloud.dataplex.v1.Task.ExecutionSpec.service_account] - * must belong to this project. - * - * Generated from protobuf field string project = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setProject($var) - { - GPBUtil::checkString($var, True); - $this->project = $var; - - return $this; - } - - /** - * Optional. The maximum duration after which the job execution is expired. - * - * Generated from protobuf field .google.protobuf.Duration max_job_execution_lifetime = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Duration|null - */ - public function getMaxJobExecutionLifetime() - { - return $this->max_job_execution_lifetime; - } - - public function hasMaxJobExecutionLifetime() - { - return isset($this->max_job_execution_lifetime); - } - - public function clearMaxJobExecutionLifetime() - { - unset($this->max_job_execution_lifetime); - } - - /** - * Optional. The maximum duration after which the job execution is expired. - * - * Generated from protobuf field .google.protobuf.Duration max_job_execution_lifetime = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setMaxJobExecutionLifetime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->max_job_execution_lifetime = $var; - - return $this; - } - - /** - * Optional. The Cloud KMS key to use for encryption, of the form: - * `projects/{project_number}/locations/{location_id}/keyRings/{key-ring-name}/cryptoKeys/{key-name}`. - * - * Generated from protobuf field string kms_key = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getKmsKey() - { - return $this->kms_key; - } - - /** - * Optional. The Cloud KMS key to use for encryption, of the form: - * `projects/{project_number}/locations/{location_id}/keyRings/{key-ring-name}/cryptoKeys/{key-name}`. - * - * Generated from protobuf field string kms_key = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setKmsKey($var) - { - GPBUtil::checkString($var, True); - $this->kms_key = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ExecutionSpec::class, \Google\Cloud\Dataplex\V1\Task_ExecutionSpec::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/ExecutionStatus.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/ExecutionStatus.php deleted file mode 100644 index 2abbc0a85df9..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/ExecutionStatus.php +++ /dev/null @@ -1,124 +0,0 @@ -google.cloud.dataplex.v1.Task.ExecutionStatus - */ -class ExecutionStatus extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Last update time of the status. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Output only. latest job execution - * - * Generated from protobuf field .google.cloud.dataplex.v1.Job latest_job = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $latest_job = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $update_time - * Output only. Last update time of the status. - * @type \Google\Cloud\Dataplex\V1\Job $latest_job - * Output only. latest job execution - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Tasks::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Last update time of the status. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. Last update time of the status. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Output only. latest job execution - * - * Generated from protobuf field .google.cloud.dataplex.v1.Job latest_job = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Dataplex\V1\Job|null - */ - public function getLatestJob() - { - return $this->latest_job; - } - - public function hasLatestJob() - { - return isset($this->latest_job); - } - - public function clearLatestJob() - { - unset($this->latest_job); - } - - /** - * Output only. latest job execution - * - * Generated from protobuf field .google.cloud.dataplex.v1.Job latest_job = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Dataplex\V1\Job $var - * @return $this - */ - public function setLatestJob($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Job::class); - $this->latest_job = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ExecutionStatus::class, \Google\Cloud\Dataplex\V1\Task_ExecutionStatus::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/InfrastructureSpec.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/InfrastructureSpec.php deleted file mode 100644 index 3cde74d13131..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/InfrastructureSpec.php +++ /dev/null @@ -1,162 +0,0 @@ -google.cloud.dataplex.v1.Task.InfrastructureSpec - */ -class InfrastructureSpec extends \Google\Protobuf\Internal\Message -{ - protected $resources; - protected $runtime; - protected $network; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dataplex\V1\Task\InfrastructureSpec\BatchComputeResources $batch - * Compute resources needed for a Task when using Dataproc Serverless. - * @type \Google\Cloud\Dataplex\V1\Task\InfrastructureSpec\ContainerImageRuntime $container_image - * Container Image Runtime Configuration. - * @type \Google\Cloud\Dataplex\V1\Task\InfrastructureSpec\VpcNetwork $vpc_network - * Vpc network. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Tasks::initOnce(); - parent::__construct($data); - } - - /** - * Compute resources needed for a Task when using Dataproc Serverless. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources batch = 52; - * @return \Google\Cloud\Dataplex\V1\Task\InfrastructureSpec\BatchComputeResources|null - */ - public function getBatch() - { - return $this->readOneof(52); - } - - public function hasBatch() - { - return $this->hasOneof(52); - } - - /** - * Compute resources needed for a Task when using Dataproc Serverless. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources batch = 52; - * @param \Google\Cloud\Dataplex\V1\Task\InfrastructureSpec\BatchComputeResources $var - * @return $this - */ - public function setBatch($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Task\InfrastructureSpec\BatchComputeResources::class); - $this->writeOneof(52, $var); - - return $this; - } - - /** - * Container Image Runtime Configuration. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime container_image = 101; - * @return \Google\Cloud\Dataplex\V1\Task\InfrastructureSpec\ContainerImageRuntime|null - */ - public function getContainerImage() - { - return $this->readOneof(101); - } - - public function hasContainerImage() - { - return $this->hasOneof(101); - } - - /** - * Container Image Runtime Configuration. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime container_image = 101; - * @param \Google\Cloud\Dataplex\V1\Task\InfrastructureSpec\ContainerImageRuntime $var - * @return $this - */ - public function setContainerImage($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Task\InfrastructureSpec\ContainerImageRuntime::class); - $this->writeOneof(101, $var); - - return $this; - } - - /** - * Vpc network. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork vpc_network = 150; - * @return \Google\Cloud\Dataplex\V1\Task\InfrastructureSpec\VpcNetwork|null - */ - public function getVpcNetwork() - { - return $this->readOneof(150); - } - - public function hasVpcNetwork() - { - return $this->hasOneof(150); - } - - /** - * Vpc network. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork vpc_network = 150; - * @param \Google\Cloud\Dataplex\V1\Task\InfrastructureSpec\VpcNetwork $var - * @return $this - */ - public function setVpcNetwork($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Task\InfrastructureSpec\VpcNetwork::class); - $this->writeOneof(150, $var); - - return $this; - } - - /** - * @return string - */ - public function getResources() - { - return $this->whichOneof("resources"); - } - - /** - * @return string - */ - public function getRuntime() - { - return $this->whichOneof("runtime"); - } - - /** - * @return string - */ - public function getNetwork() - { - return $this->whichOneof("network"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(InfrastructureSpec::class, \Google\Cloud\Dataplex\V1\Task_InfrastructureSpec::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/InfrastructureSpec/BatchComputeResources.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/InfrastructureSpec/BatchComputeResources.php deleted file mode 100644 index 17bcd03b03df..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/InfrastructureSpec/BatchComputeResources.php +++ /dev/null @@ -1,116 +0,0 @@ -google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources - */ -class BatchComputeResources extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Total number of job executors. - * Executor Count should be between 2 and 100. [Default=2] - * - * Generated from protobuf field int32 executors_count = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $executors_count = 0; - /** - * Optional. Max configurable executors. - * If max_executors_count > executors_count, then auto-scaling is enabled. - * Max Executor Count should be between 2 and 1000. [Default=1000] - * - * Generated from protobuf field int32 max_executors_count = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $max_executors_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $executors_count - * Optional. Total number of job executors. - * Executor Count should be between 2 and 100. [Default=2] - * @type int $max_executors_count - * Optional. Max configurable executors. - * If max_executors_count > executors_count, then auto-scaling is enabled. - * Max Executor Count should be between 2 and 1000. [Default=1000] - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Tasks::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Total number of job executors. - * Executor Count should be between 2 and 100. [Default=2] - * - * Generated from protobuf field int32 executors_count = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getExecutorsCount() - { - return $this->executors_count; - } - - /** - * Optional. Total number of job executors. - * Executor Count should be between 2 and 100. [Default=2] - * - * Generated from protobuf field int32 executors_count = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setExecutorsCount($var) - { - GPBUtil::checkInt32($var); - $this->executors_count = $var; - - return $this; - } - - /** - * Optional. Max configurable executors. - * If max_executors_count > executors_count, then auto-scaling is enabled. - * Max Executor Count should be between 2 and 1000. [Default=1000] - * - * Generated from protobuf field int32 max_executors_count = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getMaxExecutorsCount() - { - return $this->max_executors_count; - } - - /** - * Optional. Max configurable executors. - * If max_executors_count > executors_count, then auto-scaling is enabled. - * Max Executor Count should be between 2 and 1000. [Default=1000] - * - * Generated from protobuf field int32 max_executors_count = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setMaxExecutorsCount($var) - { - GPBUtil::checkInt32($var); - $this->max_executors_count = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(BatchComputeResources::class, \Google\Cloud\Dataplex\V1\Task_InfrastructureSpec_BatchComputeResources::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/InfrastructureSpec/ContainerImageRuntime.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/InfrastructureSpec/ContainerImageRuntime.php deleted file mode 100644 index ea2a1ab8c5d3..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/InfrastructureSpec/ContainerImageRuntime.php +++ /dev/null @@ -1,204 +0,0 @@ -google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime - */ -class ContainerImageRuntime extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Container image to use. - * - * Generated from protobuf field string image = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $image = ''; - /** - * Optional. A list of Java JARS to add to the classpath. - * Valid input includes Cloud Storage URIs to Jar binaries. - * For example, gs://bucket-name/my/path/to/file.jar - * - * Generated from protobuf field repeated string java_jars = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $java_jars; - /** - * Optional. A list of python packages to be installed. - * Valid formats include Cloud Storage URI to a PIP installable library. - * For example, gs://bucket-name/my/path/to/lib.tar.gz - * - * Generated from protobuf field repeated string python_packages = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $python_packages; - /** - * Optional. Override to common configuration of open source components - * installed on the Dataproc cluster. The properties to set on daemon - * config files. Property keys are specified in `prefix:property` format, - * for example `core:hadoop.tmp.dir`. For more information, see [Cluster - * properties](https://cloud.google.com/dataproc/docs/concepts/cluster-properties). - * - * Generated from protobuf field map properties = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $properties; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $image - * Optional. Container image to use. - * @type array|\Google\Protobuf\Internal\RepeatedField $java_jars - * Optional. A list of Java JARS to add to the classpath. - * Valid input includes Cloud Storage URIs to Jar binaries. - * For example, gs://bucket-name/my/path/to/file.jar - * @type array|\Google\Protobuf\Internal\RepeatedField $python_packages - * Optional. A list of python packages to be installed. - * Valid formats include Cloud Storage URI to a PIP installable library. - * For example, gs://bucket-name/my/path/to/lib.tar.gz - * @type array|\Google\Protobuf\Internal\MapField $properties - * Optional. Override to common configuration of open source components - * installed on the Dataproc cluster. The properties to set on daemon - * config files. Property keys are specified in `prefix:property` format, - * for example `core:hadoop.tmp.dir`. For more information, see [Cluster - * properties](https://cloud.google.com/dataproc/docs/concepts/cluster-properties). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Tasks::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Container image to use. - * - * Generated from protobuf field string image = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getImage() - { - return $this->image; - } - - /** - * Optional. Container image to use. - * - * Generated from protobuf field string image = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setImage($var) - { - GPBUtil::checkString($var, True); - $this->image = $var; - - return $this; - } - - /** - * Optional. A list of Java JARS to add to the classpath. - * Valid input includes Cloud Storage URIs to Jar binaries. - * For example, gs://bucket-name/my/path/to/file.jar - * - * Generated from protobuf field repeated string java_jars = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getJavaJars() - { - return $this->java_jars; - } - - /** - * Optional. A list of Java JARS to add to the classpath. - * Valid input includes Cloud Storage URIs to Jar binaries. - * For example, gs://bucket-name/my/path/to/file.jar - * - * Generated from protobuf field repeated string java_jars = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setJavaJars($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->java_jars = $arr; - - return $this; - } - - /** - * Optional. A list of python packages to be installed. - * Valid formats include Cloud Storage URI to a PIP installable library. - * For example, gs://bucket-name/my/path/to/lib.tar.gz - * - * Generated from protobuf field repeated string python_packages = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPythonPackages() - { - return $this->python_packages; - } - - /** - * Optional. A list of python packages to be installed. - * Valid formats include Cloud Storage URI to a PIP installable library. - * For example, gs://bucket-name/my/path/to/lib.tar.gz - * - * Generated from protobuf field repeated string python_packages = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPythonPackages($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->python_packages = $arr; - - return $this; - } - - /** - * Optional. Override to common configuration of open source components - * installed on the Dataproc cluster. The properties to set on daemon - * config files. Property keys are specified in `prefix:property` format, - * for example `core:hadoop.tmp.dir`. For more information, see [Cluster - * properties](https://cloud.google.com/dataproc/docs/concepts/cluster-properties). - * - * Generated from protobuf field map properties = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getProperties() - { - return $this->properties; - } - - /** - * Optional. Override to common configuration of open source components - * installed on the Dataproc cluster. The properties to set on daemon - * config files. Property keys are specified in `prefix:property` format, - * for example `core:hadoop.tmp.dir`. For more information, see [Cluster - * properties](https://cloud.google.com/dataproc/docs/concepts/cluster-properties). - * - * Generated from protobuf field map properties = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setProperties($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->properties = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ContainerImageRuntime::class, \Google\Cloud\Dataplex\V1\Task_InfrastructureSpec_ContainerImageRuntime::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/InfrastructureSpec/VpcNetwork.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/InfrastructureSpec/VpcNetwork.php deleted file mode 100644 index a276c3e7ee3f..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/InfrastructureSpec/VpcNetwork.php +++ /dev/null @@ -1,148 +0,0 @@ -google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork - */ -class VpcNetwork extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. List of network tags to apply to the job. - * - * Generated from protobuf field repeated string network_tags = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $network_tags; - protected $network_name; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $network - * Optional. The Cloud VPC network in which the job is run. By default, - * the Cloud VPC network named Default within the project is used. - * @type string $sub_network - * Optional. The Cloud VPC sub-network in which the job is run. - * @type array|\Google\Protobuf\Internal\RepeatedField $network_tags - * Optional. List of network tags to apply to the job. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Tasks::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The Cloud VPC network in which the job is run. By default, - * the Cloud VPC network named Default within the project is used. - * - * Generated from protobuf field string network = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getNetwork() - { - return $this->readOneof(1); - } - - public function hasNetwork() - { - return $this->hasOneof(1); - } - - /** - * Optional. The Cloud VPC network in which the job is run. By default, - * the Cloud VPC network named Default within the project is used. - * - * Generated from protobuf field string network = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setNetwork($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Optional. The Cloud VPC sub-network in which the job is run. - * - * Generated from protobuf field string sub_network = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getSubNetwork() - { - return $this->readOneof(2); - } - - public function hasSubNetwork() - { - return $this->hasOneof(2); - } - - /** - * Optional. The Cloud VPC sub-network in which the job is run. - * - * Generated from protobuf field string sub_network = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setSubNetwork($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Optional. List of network tags to apply to the job. - * - * Generated from protobuf field repeated string network_tags = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNetworkTags() - { - return $this->network_tags; - } - - /** - * Optional. List of network tags to apply to the job. - * - * Generated from protobuf field repeated string network_tags = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNetworkTags($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->network_tags = $arr; - - return $this; - } - - /** - * @return string - */ - public function getNetworkName() - { - return $this->whichOneof("network_name"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(VpcNetwork::class, \Google\Cloud\Dataplex\V1\Task_InfrastructureSpec_VpcNetwork::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/NotebookTaskConfig.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/NotebookTaskConfig.php deleted file mode 100644 index b3c61eecd7aa..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/NotebookTaskConfig.php +++ /dev/null @@ -1,206 +0,0 @@ -google.cloud.dataplex.v1.Task.NotebookTaskConfig - */ -class NotebookTaskConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Path to input notebook. This can be the Cloud Storage URI of - * the notebook file or the path to a Notebook Content. The execution args - * are accessible as environment variables - * (`TASK_key=value`). - * - * Generated from protobuf field string notebook = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $notebook = ''; - /** - * Optional. Infrastructure specification for the execution. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Task.InfrastructureSpec infrastructure_spec = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $infrastructure_spec = null; - /** - * Optional. Cloud Storage URIs of files to be placed in the working - * directory of each executor. - * - * Generated from protobuf field repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $file_uris; - /** - * Optional. Cloud Storage URIs of archives to be extracted into the working - * directory of each executor. Supported file types: .jar, .tar, .tar.gz, - * .tgz, and .zip. - * - * Generated from protobuf field repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $archive_uris; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $notebook - * Required. Path to input notebook. This can be the Cloud Storage URI of - * the notebook file or the path to a Notebook Content. The execution args - * are accessible as environment variables - * (`TASK_key=value`). - * @type \Google\Cloud\Dataplex\V1\Task\InfrastructureSpec $infrastructure_spec - * Optional. Infrastructure specification for the execution. - * @type array|\Google\Protobuf\Internal\RepeatedField $file_uris - * Optional. Cloud Storage URIs of files to be placed in the working - * directory of each executor. - * @type array|\Google\Protobuf\Internal\RepeatedField $archive_uris - * Optional. Cloud Storage URIs of archives to be extracted into the working - * directory of each executor. Supported file types: .jar, .tar, .tar.gz, - * .tgz, and .zip. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Tasks::initOnce(); - parent::__construct($data); - } - - /** - * Required. Path to input notebook. This can be the Cloud Storage URI of - * the notebook file or the path to a Notebook Content. The execution args - * are accessible as environment variables - * (`TASK_key=value`). - * - * Generated from protobuf field string notebook = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getNotebook() - { - return $this->notebook; - } - - /** - * Required. Path to input notebook. This can be the Cloud Storage URI of - * the notebook file or the path to a Notebook Content. The execution args - * are accessible as environment variables - * (`TASK_key=value`). - * - * Generated from protobuf field string notebook = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setNotebook($var) - { - GPBUtil::checkString($var, True); - $this->notebook = $var; - - return $this; - } - - /** - * Optional. Infrastructure specification for the execution. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Task.InfrastructureSpec infrastructure_spec = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataplex\V1\Task\InfrastructureSpec|null - */ - public function getInfrastructureSpec() - { - return $this->infrastructure_spec; - } - - public function hasInfrastructureSpec() - { - return isset($this->infrastructure_spec); - } - - public function clearInfrastructureSpec() - { - unset($this->infrastructure_spec); - } - - /** - * Optional. Infrastructure specification for the execution. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Task.InfrastructureSpec infrastructure_spec = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataplex\V1\Task\InfrastructureSpec $var - * @return $this - */ - public function setInfrastructureSpec($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Task\InfrastructureSpec::class); - $this->infrastructure_spec = $var; - - return $this; - } - - /** - * Optional. Cloud Storage URIs of files to be placed in the working - * directory of each executor. - * - * Generated from protobuf field repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFileUris() - { - return $this->file_uris; - } - - /** - * Optional. Cloud Storage URIs of files to be placed in the working - * directory of each executor. - * - * Generated from protobuf field repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFileUris($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->file_uris = $arr; - - return $this; - } - - /** - * Optional. Cloud Storage URIs of archives to be extracted into the working - * directory of each executor. Supported file types: .jar, .tar, .tar.gz, - * .tgz, and .zip. - * - * Generated from protobuf field repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getArchiveUris() - { - return $this->archive_uris; - } - - /** - * Optional. Cloud Storage URIs of archives to be extracted into the working - * directory of each executor. Supported file types: .jar, .tar, .tar.gz, - * .tgz, and .zip. - * - * Generated from protobuf field repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setArchiveUris($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->archive_uris = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(NotebookTaskConfig::class, \Google\Cloud\Dataplex\V1\Task_NotebookTaskConfig::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/SparkTaskConfig.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/SparkTaskConfig.php deleted file mode 100644 index 48bab1ddccf1..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/SparkTaskConfig.php +++ /dev/null @@ -1,373 +0,0 @@ -google.cloud.dataplex.v1.Task.SparkTaskConfig - */ -class SparkTaskConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Cloud Storage URIs of files to be placed in the working - * directory of each executor. - * - * Generated from protobuf field repeated string file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $file_uris; - /** - * Optional. Cloud Storage URIs of archives to be extracted into the working - * directory of each executor. Supported file types: .jar, .tar, .tar.gz, - * .tgz, and .zip. - * - * Generated from protobuf field repeated string archive_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $archive_uris; - /** - * Optional. Infrastructure specification for the execution. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Task.InfrastructureSpec infrastructure_spec = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $infrastructure_spec = null; - protected $driver; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $main_jar_file_uri - * The Cloud Storage URI of the jar file that contains the main class. - * The execution args are passed in as a sequence of named process - * arguments (`--key=value`). - * @type string $main_class - * The name of the driver's main class. The jar file that contains the - * class must be in the default CLASSPATH or specified in - * `jar_file_uris`. - * The execution args are passed in as a sequence of named process - * arguments (`--key=value`). - * @type string $python_script_file - * The Gcloud Storage URI of the main Python file to use as the driver. - * Must be a .py file. The execution args are passed in as a sequence of - * named process arguments (`--key=value`). - * @type string $sql_script_file - * A reference to a query file. This can be the Cloud Storage URI of the - * query file or it can the path to a SqlScript Content. The execution - * args are used to declare a set of script variables - * (`set key="value";`). - * @type string $sql_script - * The query text. - * The execution args are used to declare a set of script variables - * (`set key="value";`). - * @type array|\Google\Protobuf\Internal\RepeatedField $file_uris - * Optional. Cloud Storage URIs of files to be placed in the working - * directory of each executor. - * @type array|\Google\Protobuf\Internal\RepeatedField $archive_uris - * Optional. Cloud Storage URIs of archives to be extracted into the working - * directory of each executor. Supported file types: .jar, .tar, .tar.gz, - * .tgz, and .zip. - * @type \Google\Cloud\Dataplex\V1\Task\InfrastructureSpec $infrastructure_spec - * Optional. Infrastructure specification for the execution. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Tasks::initOnce(); - parent::__construct($data); - } - - /** - * The Cloud Storage URI of the jar file that contains the main class. - * The execution args are passed in as a sequence of named process - * arguments (`--key=value`). - * - * Generated from protobuf field string main_jar_file_uri = 100; - * @return string - */ - public function getMainJarFileUri() - { - return $this->readOneof(100); - } - - public function hasMainJarFileUri() - { - return $this->hasOneof(100); - } - - /** - * The Cloud Storage URI of the jar file that contains the main class. - * The execution args are passed in as a sequence of named process - * arguments (`--key=value`). - * - * Generated from protobuf field string main_jar_file_uri = 100; - * @param string $var - * @return $this - */ - public function setMainJarFileUri($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(100, $var); - - return $this; - } - - /** - * The name of the driver's main class. The jar file that contains the - * class must be in the default CLASSPATH or specified in - * `jar_file_uris`. - * The execution args are passed in as a sequence of named process - * arguments (`--key=value`). - * - * Generated from protobuf field string main_class = 101; - * @return string - */ - public function getMainClass() - { - return $this->readOneof(101); - } - - public function hasMainClass() - { - return $this->hasOneof(101); - } - - /** - * The name of the driver's main class. The jar file that contains the - * class must be in the default CLASSPATH or specified in - * `jar_file_uris`. - * The execution args are passed in as a sequence of named process - * arguments (`--key=value`). - * - * Generated from protobuf field string main_class = 101; - * @param string $var - * @return $this - */ - public function setMainClass($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(101, $var); - - return $this; - } - - /** - * The Gcloud Storage URI of the main Python file to use as the driver. - * Must be a .py file. The execution args are passed in as a sequence of - * named process arguments (`--key=value`). - * - * Generated from protobuf field string python_script_file = 102; - * @return string - */ - public function getPythonScriptFile() - { - return $this->readOneof(102); - } - - public function hasPythonScriptFile() - { - return $this->hasOneof(102); - } - - /** - * The Gcloud Storage URI of the main Python file to use as the driver. - * Must be a .py file. The execution args are passed in as a sequence of - * named process arguments (`--key=value`). - * - * Generated from protobuf field string python_script_file = 102; - * @param string $var - * @return $this - */ - public function setPythonScriptFile($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(102, $var); - - return $this; - } - - /** - * A reference to a query file. This can be the Cloud Storage URI of the - * query file or it can the path to a SqlScript Content. The execution - * args are used to declare a set of script variables - * (`set key="value";`). - * - * Generated from protobuf field string sql_script_file = 104; - * @return string - */ - public function getSqlScriptFile() - { - return $this->readOneof(104); - } - - public function hasSqlScriptFile() - { - return $this->hasOneof(104); - } - - /** - * A reference to a query file. This can be the Cloud Storage URI of the - * query file or it can the path to a SqlScript Content. The execution - * args are used to declare a set of script variables - * (`set key="value";`). - * - * Generated from protobuf field string sql_script_file = 104; - * @param string $var - * @return $this - */ - public function setSqlScriptFile($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(104, $var); - - return $this; - } - - /** - * The query text. - * The execution args are used to declare a set of script variables - * (`set key="value";`). - * - * Generated from protobuf field string sql_script = 105; - * @return string - */ - public function getSqlScript() - { - return $this->readOneof(105); - } - - public function hasSqlScript() - { - return $this->hasOneof(105); - } - - /** - * The query text. - * The execution args are used to declare a set of script variables - * (`set key="value";`). - * - * Generated from protobuf field string sql_script = 105; - * @param string $var - * @return $this - */ - public function setSqlScript($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(105, $var); - - return $this; - } - - /** - * Optional. Cloud Storage URIs of files to be placed in the working - * directory of each executor. - * - * Generated from protobuf field repeated string file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFileUris() - { - return $this->file_uris; - } - - /** - * Optional. Cloud Storage URIs of files to be placed in the working - * directory of each executor. - * - * Generated from protobuf field repeated string file_uris = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFileUris($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->file_uris = $arr; - - return $this; - } - - /** - * Optional. Cloud Storage URIs of archives to be extracted into the working - * directory of each executor. Supported file types: .jar, .tar, .tar.gz, - * .tgz, and .zip. - * - * Generated from protobuf field repeated string archive_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getArchiveUris() - { - return $this->archive_uris; - } - - /** - * Optional. Cloud Storage URIs of archives to be extracted into the working - * directory of each executor. Supported file types: .jar, .tar, .tar.gz, - * .tgz, and .zip. - * - * Generated from protobuf field repeated string archive_uris = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setArchiveUris($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->archive_uris = $arr; - - return $this; - } - - /** - * Optional. Infrastructure specification for the execution. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Task.InfrastructureSpec infrastructure_spec = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataplex\V1\Task\InfrastructureSpec|null - */ - public function getInfrastructureSpec() - { - return $this->infrastructure_spec; - } - - public function hasInfrastructureSpec() - { - return isset($this->infrastructure_spec); - } - - public function clearInfrastructureSpec() - { - unset($this->infrastructure_spec); - } - - /** - * Optional. Infrastructure specification for the execution. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Task.InfrastructureSpec infrastructure_spec = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataplex\V1\Task\InfrastructureSpec $var - * @return $this - */ - public function setInfrastructureSpec($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Task\InfrastructureSpec::class); - $this->infrastructure_spec = $var; - - return $this; - } - - /** - * @return string - */ - public function getDriver() - { - return $this->whichOneof("driver"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SparkTaskConfig::class, \Google\Cloud\Dataplex\V1\Task_SparkTaskConfig::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/TriggerSpec.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/TriggerSpec.php deleted file mode 100644 index dc0980070345..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/TriggerSpec.php +++ /dev/null @@ -1,262 +0,0 @@ -google.cloud.dataplex.v1.Task.TriggerSpec - */ -class TriggerSpec extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Immutable. Trigger type of the user-specified Task. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Task.TriggerSpec.Type type = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - */ - protected $type = 0; - /** - * Optional. The first run of the task will be after this time. - * If not specified, the task will run shortly after being submitted if - * ON_DEMAND and based on the schedule if RECURRING. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $start_time = null; - /** - * Optional. Prevent the task from executing. - * This does not cancel already running tasks. It is intended to temporarily - * disable RECURRING tasks. - * - * Generated from protobuf field bool disabled = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $disabled = false; - /** - * Optional. Number of retry attempts before aborting. - * Set to zero to never attempt to retry a failed task. - * - * Generated from protobuf field int32 max_retries = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $max_retries = 0; - protected $trigger; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $type - * Required. Immutable. Trigger type of the user-specified Task. - * @type \Google\Protobuf\Timestamp $start_time - * Optional. The first run of the task will be after this time. - * If not specified, the task will run shortly after being submitted if - * ON_DEMAND and based on the schedule if RECURRING. - * @type bool $disabled - * Optional. Prevent the task from executing. - * This does not cancel already running tasks. It is intended to temporarily - * disable RECURRING tasks. - * @type int $max_retries - * Optional. Number of retry attempts before aborting. - * Set to zero to never attempt to retry a failed task. - * @type string $schedule - * Optional. Cron schedule (https://en.wikipedia.org/wiki/Cron) for - * running tasks periodically. To explicitly set a timezone to the cron - * tab, apply a prefix in the cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or - * "TZ=${IANA_TIME_ZONE}". The ${IANA_TIME_ZONE} may only be a valid - * string from IANA time zone database. For example, - * `CRON_TZ=America/New_York 1 * * * *`, or `TZ=America/New_York 1 * * * - * *`. This field is required for RECURRING tasks. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Tasks::initOnce(); - parent::__construct($data); - } - - /** - * Required. Immutable. Trigger type of the user-specified Task. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Task.TriggerSpec.Type type = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Required. Immutable. Trigger type of the user-specified Task. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Task.TriggerSpec.Type type = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\Task\TriggerSpec\Type::class); - $this->type = $var; - - return $this; - } - - /** - * Optional. The first run of the task will be after this time. - * If not specified, the task will run shortly after being submitted if - * ON_DEMAND and based on the schedule if RECURRING. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStartTime() - { - return $this->start_time; - } - - public function hasStartTime() - { - return isset($this->start_time); - } - - public function clearStartTime() - { - unset($this->start_time); - } - - /** - * Optional. The first run of the task will be after this time. - * If not specified, the task will run shortly after being submitted if - * ON_DEMAND and based on the schedule if RECURRING. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * Optional. Prevent the task from executing. - * This does not cancel already running tasks. It is intended to temporarily - * disable RECURRING tasks. - * - * Generated from protobuf field bool disabled = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getDisabled() - { - return $this->disabled; - } - - /** - * Optional. Prevent the task from executing. - * This does not cancel already running tasks. It is intended to temporarily - * disable RECURRING tasks. - * - * Generated from protobuf field bool disabled = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setDisabled($var) - { - GPBUtil::checkBool($var); - $this->disabled = $var; - - return $this; - } - - /** - * Optional. Number of retry attempts before aborting. - * Set to zero to never attempt to retry a failed task. - * - * Generated from protobuf field int32 max_retries = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getMaxRetries() - { - return $this->max_retries; - } - - /** - * Optional. Number of retry attempts before aborting. - * Set to zero to never attempt to retry a failed task. - * - * Generated from protobuf field int32 max_retries = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setMaxRetries($var) - { - GPBUtil::checkInt32($var); - $this->max_retries = $var; - - return $this; - } - - /** - * Optional. Cron schedule (https://en.wikipedia.org/wiki/Cron) for - * running tasks periodically. To explicitly set a timezone to the cron - * tab, apply a prefix in the cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or - * "TZ=${IANA_TIME_ZONE}". The ${IANA_TIME_ZONE} may only be a valid - * string from IANA time zone database. For example, - * `CRON_TZ=America/New_York 1 * * * *`, or `TZ=America/New_York 1 * * * - * *`. This field is required for RECURRING tasks. - * - * Generated from protobuf field string schedule = 100 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getSchedule() - { - return $this->readOneof(100); - } - - public function hasSchedule() - { - return $this->hasOneof(100); - } - - /** - * Optional. Cron schedule (https://en.wikipedia.org/wiki/Cron) for - * running tasks periodically. To explicitly set a timezone to the cron - * tab, apply a prefix in the cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or - * "TZ=${IANA_TIME_ZONE}". The ${IANA_TIME_ZONE} may only be a valid - * string from IANA time zone database. For example, - * `CRON_TZ=America/New_York 1 * * * *`, or `TZ=America/New_York 1 * * * - * *`. This field is required for RECURRING tasks. - * - * Generated from protobuf field string schedule = 100 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setSchedule($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(100, $var); - - return $this; - } - - /** - * @return string - */ - public function getTrigger() - { - return $this->whichOneof("trigger"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(TriggerSpec::class, \Google\Cloud\Dataplex\V1\Task_TriggerSpec::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/TriggerSpec/Type.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/TriggerSpec/Type.php deleted file mode 100644 index c9aaf3812924..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Task/TriggerSpec/Type.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.dataplex.v1.Task.TriggerSpec.Type - */ -class Type -{ - /** - * Unspecified trigger type. - * - * Generated from protobuf enum TYPE_UNSPECIFIED = 0; - */ - const TYPE_UNSPECIFIED = 0; - /** - * The task runs one-time shortly after Task Creation. - * - * Generated from protobuf enum ON_DEMAND = 1; - */ - const ON_DEMAND = 1; - /** - * The task is scheduled to run periodically. - * - * Generated from protobuf enum RECURRING = 2; - */ - const RECURRING = 2; - - private static $valueToName = [ - self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', - self::ON_DEMAND => 'ON_DEMAND', - self::RECURRING => 'RECURRING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Type::class, \Google\Cloud\Dataplex\V1\Task_TriggerSpec_Type::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/TransferStatus.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/TransferStatus.php deleted file mode 100644 index f9c50188075b..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/TransferStatus.php +++ /dev/null @@ -1,66 +0,0 @@ -google.cloud.dataplex.v1.TransferStatus - */ -class TransferStatus -{ - /** - * The default value. It is set for resources that were not subject for - * migration from Data Catalog service. - * - * Generated from protobuf enum TRANSFER_STATUS_UNSPECIFIED = 0; - */ - const TRANSFER_STATUS_UNSPECIFIED = 0; - /** - * Indicates that a resource was migrated from Data Catalog service but it - * hasn't been transferred yet. In particular the resource cannot be updated - * from Dataplex API. - * - * Generated from protobuf enum TRANSFER_STATUS_MIGRATED = 1; - */ - const TRANSFER_STATUS_MIGRATED = 1; - /** - * Indicates that a resource was transferred from Data Catalog service. The - * resource can only be updated from Dataplex API. - * - * Generated from protobuf enum TRANSFER_STATUS_TRANSFERRED = 2; - */ - const TRANSFER_STATUS_TRANSFERRED = 2; - - private static $valueToName = [ - self::TRANSFER_STATUS_UNSPECIFIED => 'TRANSFER_STATUS_UNSPECIFIED', - self::TRANSFER_STATUS_MIGRATED => 'TRANSFER_STATUS_MIGRATED', - self::TRANSFER_STATUS_TRANSFERRED => 'TRANSFER_STATUS_TRANSFERRED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Trigger.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Trigger.php deleted file mode 100644 index 2e7aa5b11786..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Trigger.php +++ /dev/null @@ -1,108 +0,0 @@ -google.cloud.dataplex.v1.Trigger - */ -class Trigger extends \Google\Protobuf\Internal\Message -{ - protected $mode; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dataplex\V1\Trigger\OnDemand $on_demand - * The scan runs once via `RunDataScan` API. - * @type \Google\Cloud\Dataplex\V1\Trigger\Schedule $schedule - * The scan is scheduled to run periodically. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Processing::initOnce(); - parent::__construct($data); - } - - /** - * The scan runs once via `RunDataScan` API. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Trigger.OnDemand on_demand = 100; - * @return \Google\Cloud\Dataplex\V1\Trigger\OnDemand|null - */ - public function getOnDemand() - { - return $this->readOneof(100); - } - - public function hasOnDemand() - { - return $this->hasOneof(100); - } - - /** - * The scan runs once via `RunDataScan` API. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Trigger.OnDemand on_demand = 100; - * @param \Google\Cloud\Dataplex\V1\Trigger\OnDemand $var - * @return $this - */ - public function setOnDemand($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Trigger\OnDemand::class); - $this->writeOneof(100, $var); - - return $this; - } - - /** - * The scan is scheduled to run periodically. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Trigger.Schedule schedule = 101; - * @return \Google\Cloud\Dataplex\V1\Trigger\Schedule|null - */ - public function getSchedule() - { - return $this->readOneof(101); - } - - public function hasSchedule() - { - return $this->hasOneof(101); - } - - /** - * The scan is scheduled to run periodically. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Trigger.Schedule schedule = 101; - * @param \Google\Cloud\Dataplex\V1\Trigger\Schedule $var - * @return $this - */ - public function setSchedule($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Trigger\Schedule::class); - $this->writeOneof(101, $var); - - return $this; - } - - /** - * @return string - */ - public function getMode() - { - return $this->whichOneof("mode"); - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Trigger/OnDemand.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Trigger/OnDemand.php deleted file mode 100644 index 610340b74866..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Trigger/OnDemand.php +++ /dev/null @@ -1,36 +0,0 @@ -google.cloud.dataplex.v1.Trigger.OnDemand - */ -class OnDemand extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Processing::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(OnDemand::class, \Google\Cloud\Dataplex\V1\Trigger_OnDemand::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Trigger/Schedule.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Trigger/Schedule.php deleted file mode 100644 index af91f3470b71..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Trigger/Schedule.php +++ /dev/null @@ -1,106 +0,0 @@ -google.cloud.dataplex.v1.Trigger.Schedule - */ -class Schedule extends \Google\Protobuf\Internal\Message -{ - /** - * Required. [Cron](https://en.wikipedia.org/wiki/Cron) schedule for running - * scans periodically. - * To explicitly set a timezone in the cron tab, apply a prefix in the - * cron tab: **"CRON_TZ=${IANA_TIME_ZONE}"** or **"TZ=${IANA_TIME_ZONE}"**. - * The **${IANA_TIME_ZONE}** may only be a valid string from IANA time zone - * database - * ([wikipedia](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List)). - * For example, `CRON_TZ=America/New_York 1 * * * *`, or - * `TZ=America/New_York 1 * * * *`. - * This field is required for Schedule scans. - * - * Generated from protobuf field string cron = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $cron = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $cron - * Required. [Cron](https://en.wikipedia.org/wiki/Cron) schedule for running - * scans periodically. - * To explicitly set a timezone in the cron tab, apply a prefix in the - * cron tab: **"CRON_TZ=${IANA_TIME_ZONE}"** or **"TZ=${IANA_TIME_ZONE}"**. - * The **${IANA_TIME_ZONE}** may only be a valid string from IANA time zone - * database - * ([wikipedia](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List)). - * For example, `CRON_TZ=America/New_York 1 * * * *`, or - * `TZ=America/New_York 1 * * * *`. - * This field is required for Schedule scans. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Processing::initOnce(); - parent::__construct($data); - } - - /** - * Required. [Cron](https://en.wikipedia.org/wiki/Cron) schedule for running - * scans periodically. - * To explicitly set a timezone in the cron tab, apply a prefix in the - * cron tab: **"CRON_TZ=${IANA_TIME_ZONE}"** or **"TZ=${IANA_TIME_ZONE}"**. - * The **${IANA_TIME_ZONE}** may only be a valid string from IANA time zone - * database - * ([wikipedia](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List)). - * For example, `CRON_TZ=America/New_York 1 * * * *`, or - * `TZ=America/New_York 1 * * * *`. - * This field is required for Schedule scans. - * - * Generated from protobuf field string cron = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getCron() - { - return $this->cron; - } - - /** - * Required. [Cron](https://en.wikipedia.org/wiki/Cron) schedule for running - * scans periodically. - * To explicitly set a timezone in the cron tab, apply a prefix in the - * cron tab: **"CRON_TZ=${IANA_TIME_ZONE}"** or **"TZ=${IANA_TIME_ZONE}"**. - * The **${IANA_TIME_ZONE}** may only be a valid string from IANA time zone - * database - * ([wikipedia](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List)). - * For example, `CRON_TZ=America/New_York 1 * * * *`, or - * `TZ=America/New_York 1 * * * *`. - * This field is required for Schedule scans. - * - * Generated from protobuf field string cron = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setCron($var) - { - GPBUtil::checkString($var, True); - $this->cron = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Schedule::class, \Google\Cloud\Dataplex\V1\Trigger_Schedule::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateAspectTypeRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateAspectTypeRequest.php deleted file mode 100644 index 7dcae0b28c53..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateAspectTypeRequest.php +++ /dev/null @@ -1,174 +0,0 @@ -google.cloud.dataplex.v1.UpdateAspectTypeRequest - */ -class UpdateAspectTypeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. AspectType Resource - * - * Generated from protobuf field .google.cloud.dataplex.v1.AspectType aspect_type = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $aspect_type = null; - /** - * Required. Mask of fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validate_only = false; - - /** - * @param \Google\Cloud\Dataplex\V1\AspectType $aspectType Required. AspectType Resource - * @param \Google\Protobuf\FieldMask $updateMask Required. Mask of fields to update. - * - * @return \Google\Cloud\Dataplex\V1\UpdateAspectTypeRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Dataplex\V1\AspectType $aspectType, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setAspectType($aspectType) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dataplex\V1\AspectType $aspect_type - * Required. AspectType Resource - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Mask of fields to update. - * @type bool $validate_only - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Catalog::initOnce(); - parent::__construct($data); - } - - /** - * Required. AspectType Resource - * - * Generated from protobuf field .google.cloud.dataplex.v1.AspectType aspect_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataplex\V1\AspectType|null - */ - public function getAspectType() - { - return $this->aspect_type; - } - - public function hasAspectType() - { - return isset($this->aspect_type); - } - - public function clearAspectType() - { - unset($this->aspect_type); - } - - /** - * Required. AspectType Resource - * - * Generated from protobuf field .google.cloud.dataplex.v1.AspectType aspect_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataplex\V1\AspectType $var - * @return $this - */ - public function setAspectType($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\AspectType::class); - $this->aspect_type = $var; - - return $this; - } - - /** - * Required. Mask of fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Required. Mask of fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateAssetRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateAssetRequest.php deleted file mode 100644 index f421fa15d2da..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateAssetRequest.php +++ /dev/null @@ -1,179 +0,0 @@ -google.cloud.dataplex.v1.UpdateAssetRequest - */ -class UpdateAssetRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Mask of fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Required. Update description. - * Only fields specified in `update_mask` are updated. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Asset asset = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $asset = null; - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validate_only = false; - - /** - * @param \Google\Cloud\Dataplex\V1\Asset $asset Required. Update description. - * Only fields specified in `update_mask` are updated. - * @param \Google\Protobuf\FieldMask $updateMask Required. Mask of fields to update. - * - * @return \Google\Cloud\Dataplex\V1\UpdateAssetRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Dataplex\V1\Asset $asset, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setAsset($asset) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Mask of fields to update. - * @type \Google\Cloud\Dataplex\V1\Asset $asset - * Required. Update description. - * Only fields specified in `update_mask` are updated. - * @type bool $validate_only - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. Mask of fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Required. Mask of fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Required. Update description. - * Only fields specified in `update_mask` are updated. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Asset asset = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataplex\V1\Asset|null - */ - public function getAsset() - { - return $this->asset; - } - - public function hasAsset() - { - return isset($this->asset); - } - - public function clearAsset() - { - unset($this->asset); - } - - /** - * Required. Update description. - * Only fields specified in `update_mask` are updated. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Asset asset = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataplex\V1\Asset $var - * @return $this - */ - public function setAsset($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Asset::class); - $this->asset = $var; - - return $this; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateContentRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateContentRequest.php deleted file mode 100644 index 8cfa2d28aa8c..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateContentRequest.php +++ /dev/null @@ -1,179 +0,0 @@ -google.cloud.dataplex.v1.UpdateContentRequest - */ -class UpdateContentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Mask of fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Required. Update description. - * Only fields specified in `update_mask` are updated. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Content content = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $content = null; - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validate_only = false; - - /** - * @param \Google\Cloud\Dataplex\V1\Content $content Required. Update description. - * Only fields specified in `update_mask` are updated. - * @param \Google\Protobuf\FieldMask $updateMask Required. Mask of fields to update. - * - * @return \Google\Cloud\Dataplex\V1\UpdateContentRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Dataplex\V1\Content $content, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setContent($content) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Mask of fields to update. - * @type \Google\Cloud\Dataplex\V1\Content $content - * Required. Update description. - * Only fields specified in `update_mask` are updated. - * @type bool $validate_only - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Content::initOnce(); - parent::__construct($data); - } - - /** - * Required. Mask of fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Required. Mask of fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Required. Update description. - * Only fields specified in `update_mask` are updated. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Content content = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataplex\V1\Content|null - */ - public function getContent() - { - return $this->content; - } - - public function hasContent() - { - return isset($this->content); - } - - public function clearContent() - { - unset($this->content); - } - - /** - * Required. Update description. - * Only fields specified in `update_mask` are updated. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Content content = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataplex\V1\Content $var - * @return $this - */ - public function setContent($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Content::class); - $this->content = $var; - - return $this; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateDataAttributeBindingRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateDataAttributeBindingRequest.php deleted file mode 100644 index 5287c980b60d..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateDataAttributeBindingRequest.php +++ /dev/null @@ -1,174 +0,0 @@ -google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest - */ -class UpdateDataAttributeBindingRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Mask of fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Required. Only fields specified in `update_mask` are updated. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataAttributeBinding data_attribute_binding = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $data_attribute_binding = null; - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validate_only = false; - - /** - * @param \Google\Cloud\Dataplex\V1\DataAttributeBinding $dataAttributeBinding Required. Only fields specified in `update_mask` are updated. - * @param \Google\Protobuf\FieldMask $updateMask Required. Mask of fields to update. - * - * @return \Google\Cloud\Dataplex\V1\UpdateDataAttributeBindingRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Dataplex\V1\DataAttributeBinding $dataAttributeBinding, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setDataAttributeBinding($dataAttributeBinding) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Mask of fields to update. - * @type \Google\Cloud\Dataplex\V1\DataAttributeBinding $data_attribute_binding - * Required. Only fields specified in `update_mask` are updated. - * @type bool $validate_only - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataTaxonomy::initOnce(); - parent::__construct($data); - } - - /** - * Required. Mask of fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Required. Mask of fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Required. Only fields specified in `update_mask` are updated. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataAttributeBinding data_attribute_binding = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataplex\V1\DataAttributeBinding|null - */ - public function getDataAttributeBinding() - { - return $this->data_attribute_binding; - } - - public function hasDataAttributeBinding() - { - return isset($this->data_attribute_binding); - } - - public function clearDataAttributeBinding() - { - unset($this->data_attribute_binding); - } - - /** - * Required. Only fields specified in `update_mask` are updated. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataAttributeBinding data_attribute_binding = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataplex\V1\DataAttributeBinding $var - * @return $this - */ - public function setDataAttributeBinding($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataAttributeBinding::class); - $this->data_attribute_binding = $var; - - return $this; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateDataAttributeRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateDataAttributeRequest.php deleted file mode 100644 index c9f4468b8962..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateDataAttributeRequest.php +++ /dev/null @@ -1,174 +0,0 @@ -google.cloud.dataplex.v1.UpdateDataAttributeRequest - */ -class UpdateDataAttributeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Mask of fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Required. Only fields specified in `update_mask` are updated. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataAttribute data_attribute = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $data_attribute = null; - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validate_only = false; - - /** - * @param \Google\Cloud\Dataplex\V1\DataAttribute $dataAttribute Required. Only fields specified in `update_mask` are updated. - * @param \Google\Protobuf\FieldMask $updateMask Required. Mask of fields to update. - * - * @return \Google\Cloud\Dataplex\V1\UpdateDataAttributeRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Dataplex\V1\DataAttribute $dataAttribute, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setDataAttribute($dataAttribute) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Mask of fields to update. - * @type \Google\Cloud\Dataplex\V1\DataAttribute $data_attribute - * Required. Only fields specified in `update_mask` are updated. - * @type bool $validate_only - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataTaxonomy::initOnce(); - parent::__construct($data); - } - - /** - * Required. Mask of fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Required. Mask of fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Required. Only fields specified in `update_mask` are updated. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataAttribute data_attribute = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataplex\V1\DataAttribute|null - */ - public function getDataAttribute() - { - return $this->data_attribute; - } - - public function hasDataAttribute() - { - return isset($this->data_attribute); - } - - public function clearDataAttribute() - { - unset($this->data_attribute); - } - - /** - * Required. Only fields specified in `update_mask` are updated. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataAttribute data_attribute = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataplex\V1\DataAttribute $var - * @return $this - */ - public function setDataAttribute($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataAttribute::class); - $this->data_attribute = $var; - - return $this; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateDataScanRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateDataScanRequest.php deleted file mode 100644 index 5604a49c4fcd..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateDataScanRequest.php +++ /dev/null @@ -1,180 +0,0 @@ -google.cloud.dataplex.v1.UpdateDataScanRequest - */ -class UpdateDataScanRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. DataScan resource to be updated. - * Only fields specified in `update_mask` are updated. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScan data_scan = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $data_scan = null; - /** - * Required. Mask of fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is `false`. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validate_only = false; - - /** - * @param \Google\Cloud\Dataplex\V1\DataScan $dataScan Required. DataScan resource to be updated. - * - * Only fields specified in `update_mask` are updated. - * @param \Google\Protobuf\FieldMask $updateMask Required. Mask of fields to update. - * - * @return \Google\Cloud\Dataplex\V1\UpdateDataScanRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Dataplex\V1\DataScan $dataScan, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setDataScan($dataScan) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dataplex\V1\DataScan $data_scan - * Required. DataScan resource to be updated. - * Only fields specified in `update_mask` are updated. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Mask of fields to update. - * @type bool $validate_only - * Optional. Only validate the request, but do not perform mutations. - * The default is `false`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Datascans::initOnce(); - parent::__construct($data); - } - - /** - * Required. DataScan resource to be updated. - * Only fields specified in `update_mask` are updated. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScan data_scan = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataplex\V1\DataScan|null - */ - public function getDataScan() - { - return $this->data_scan; - } - - public function hasDataScan() - { - return isset($this->data_scan); - } - - public function clearDataScan() - { - unset($this->data_scan); - } - - /** - * Required. DataScan resource to be updated. - * Only fields specified in `update_mask` are updated. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataScan data_scan = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataplex\V1\DataScan $var - * @return $this - */ - public function setDataScan($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataScan::class); - $this->data_scan = $var; - - return $this; - } - - /** - * Required. Mask of fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Required. Mask of fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is `false`. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is `false`. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateDataTaxonomyRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateDataTaxonomyRequest.php deleted file mode 100644 index ccd50e68d9f3..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateDataTaxonomyRequest.php +++ /dev/null @@ -1,174 +0,0 @@ -google.cloud.dataplex.v1.UpdateDataTaxonomyRequest - */ -class UpdateDataTaxonomyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Mask of fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Required. Only fields specified in `update_mask` are updated. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataTaxonomy data_taxonomy = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $data_taxonomy = null; - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validate_only = false; - - /** - * @param \Google\Cloud\Dataplex\V1\DataTaxonomy $dataTaxonomy Required. Only fields specified in `update_mask` are updated. - * @param \Google\Protobuf\FieldMask $updateMask Required. Mask of fields to update. - * - * @return \Google\Cloud\Dataplex\V1\UpdateDataTaxonomyRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Dataplex\V1\DataTaxonomy $dataTaxonomy, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setDataTaxonomy($dataTaxonomy) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Mask of fields to update. - * @type \Google\Cloud\Dataplex\V1\DataTaxonomy $data_taxonomy - * Required. Only fields specified in `update_mask` are updated. - * @type bool $validate_only - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\DataTaxonomy::initOnce(); - parent::__construct($data); - } - - /** - * Required. Mask of fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Required. Mask of fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Required. Only fields specified in `update_mask` are updated. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataTaxonomy data_taxonomy = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataplex\V1\DataTaxonomy|null - */ - public function getDataTaxonomy() - { - return $this->data_taxonomy; - } - - public function hasDataTaxonomy() - { - return isset($this->data_taxonomy); - } - - public function clearDataTaxonomy() - { - unset($this->data_taxonomy); - } - - /** - * Required. Only fields specified in `update_mask` are updated. - * - * Generated from protobuf field .google.cloud.dataplex.v1.DataTaxonomy data_taxonomy = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataplex\V1\DataTaxonomy $var - * @return $this - */ - public function setDataTaxonomy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataTaxonomy::class); - $this->data_taxonomy = $var; - - return $this; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateEntityRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateEntityRequest.php deleted file mode 100644 index 5f94268620ee..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateEntityRequest.php +++ /dev/null @@ -1,118 +0,0 @@ -google.cloud.dataplex.v1.UpdateEntityRequest - */ -class UpdateEntityRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Update description. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Entity entity = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $entity = null; - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validate_only = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dataplex\V1\Entity $entity - * Required. Update description. - * @type bool $validate_only - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Metadata::initOnce(); - parent::__construct($data); - } - - /** - * Required. Update description. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Entity entity = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataplex\V1\Entity|null - */ - public function getEntity() - { - return $this->entity; - } - - public function hasEntity() - { - return isset($this->entity); - } - - public function clearEntity() - { - unset($this->entity); - } - - /** - * Required. Update description. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Entity entity = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataplex\V1\Entity $var - * @return $this - */ - public function setEntity($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Entity::class); - $this->entity = $var; - - return $this; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateEntryGroupRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateEntryGroupRequest.php deleted file mode 100644 index 16978408b1f5..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateEntryGroupRequest.php +++ /dev/null @@ -1,174 +0,0 @@ -google.cloud.dataplex.v1.UpdateEntryGroupRequest - */ -class UpdateEntryGroupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. EntryGroup Resource - * - * Generated from protobuf field .google.cloud.dataplex.v1.EntryGroup entry_group = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $entry_group = null; - /** - * Required. Mask of fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validate_only = false; - - /** - * @param \Google\Cloud\Dataplex\V1\EntryGroup $entryGroup Required. EntryGroup Resource - * @param \Google\Protobuf\FieldMask $updateMask Required. Mask of fields to update. - * - * @return \Google\Cloud\Dataplex\V1\UpdateEntryGroupRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Dataplex\V1\EntryGroup $entryGroup, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setEntryGroup($entryGroup) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dataplex\V1\EntryGroup $entry_group - * Required. EntryGroup Resource - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Mask of fields to update. - * @type bool $validate_only - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Catalog::initOnce(); - parent::__construct($data); - } - - /** - * Required. EntryGroup Resource - * - * Generated from protobuf field .google.cloud.dataplex.v1.EntryGroup entry_group = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataplex\V1\EntryGroup|null - */ - public function getEntryGroup() - { - return $this->entry_group; - } - - public function hasEntryGroup() - { - return isset($this->entry_group); - } - - public function clearEntryGroup() - { - unset($this->entry_group); - } - - /** - * Required. EntryGroup Resource - * - * Generated from protobuf field .google.cloud.dataplex.v1.EntryGroup entry_group = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataplex\V1\EntryGroup $var - * @return $this - */ - public function setEntryGroup($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\EntryGroup::class); - $this->entry_group = $var; - - return $this; - } - - /** - * Required. Mask of fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Required. Mask of fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateEntryRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateEntryRequest.php deleted file mode 100644 index e1e12c835e8a..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateEntryRequest.php +++ /dev/null @@ -1,300 +0,0 @@ -google.cloud.dataplex.v1.UpdateEntryRequest - */ -class UpdateEntryRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Entry resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Entry entry = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $entry = null; - /** - * Optional. Mask of fields to update. To update Aspects, the update_mask must - * contain the value "aspects". - * If the update_mask is empty, all modifiable fields present in the request - * will be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $update_mask = null; - /** - * Optional. If set to true and the entry does not exist, it will be created. - * - * Generated from protobuf field bool allow_missing = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $allow_missing = false; - /** - * Optional. If set to true and the aspect_keys specify aspect ranges, any - * existing aspects from that range not provided in the request will be - * deleted. - * - * Generated from protobuf field bool delete_missing_aspects = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $delete_missing_aspects = false; - /** - * Optional. The map keys of the Aspects which should be modified. Supports - * the following syntaxes: - * * - matches aspect on given type and empty path - * * @path - matches aspect on given type and specified - * path - * * * - matches aspects on given type for all paths - * * *@path - matches aspects of all types on the given path - * Existing aspects matching the syntax will not be removed unless - * `delete_missing_aspects` is set to true. - * If this field is left empty, it will be treated as specifying exactly those - * Aspects present in the request. - * - * Generated from protobuf field repeated string aspect_keys = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $aspect_keys; - - /** - * @param \Google\Cloud\Dataplex\V1\Entry $entry Required. Entry resource. - * @param \Google\Protobuf\FieldMask $updateMask Optional. Mask of fields to update. To update Aspects, the update_mask must - * contain the value "aspects". - * - * If the update_mask is empty, all modifiable fields present in the request - * will be updated. - * - * @return \Google\Cloud\Dataplex\V1\UpdateEntryRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Dataplex\V1\Entry $entry, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setEntry($entry) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dataplex\V1\Entry $entry - * Required. Entry resource. - * @type \Google\Protobuf\FieldMask $update_mask - * Optional. Mask of fields to update. To update Aspects, the update_mask must - * contain the value "aspects". - * If the update_mask is empty, all modifiable fields present in the request - * will be updated. - * @type bool $allow_missing - * Optional. If set to true and the entry does not exist, it will be created. - * @type bool $delete_missing_aspects - * Optional. If set to true and the aspect_keys specify aspect ranges, any - * existing aspects from that range not provided in the request will be - * deleted. - * @type array|\Google\Protobuf\Internal\RepeatedField $aspect_keys - * Optional. The map keys of the Aspects which should be modified. Supports - * the following syntaxes: - * * - matches aspect on given type and empty path - * * @path - matches aspect on given type and specified - * path - * * * - matches aspects on given type for all paths - * * *@path - matches aspects of all types on the given path - * Existing aspects matching the syntax will not be removed unless - * `delete_missing_aspects` is set to true. - * If this field is left empty, it will be treated as specifying exactly those - * Aspects present in the request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Catalog::initOnce(); - parent::__construct($data); - } - - /** - * Required. Entry resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Entry entry = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataplex\V1\Entry|null - */ - public function getEntry() - { - return $this->entry; - } - - public function hasEntry() - { - return isset($this->entry); - } - - public function clearEntry() - { - unset($this->entry); - } - - /** - * Required. Entry resource. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Entry entry = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataplex\V1\Entry $var - * @return $this - */ - public function setEntry($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Entry::class); - $this->entry = $var; - - return $this; - } - - /** - * Optional. Mask of fields to update. To update Aspects, the update_mask must - * contain the value "aspects". - * If the update_mask is empty, all modifiable fields present in the request - * will be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Optional. Mask of fields to update. To update Aspects, the update_mask must - * contain the value "aspects". - * If the update_mask is empty, all modifiable fields present in the request - * will be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Optional. If set to true and the entry does not exist, it will be created. - * - * Generated from protobuf field bool allow_missing = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getAllowMissing() - { - return $this->allow_missing; - } - - /** - * Optional. If set to true and the entry does not exist, it will be created. - * - * Generated from protobuf field bool allow_missing = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setAllowMissing($var) - { - GPBUtil::checkBool($var); - $this->allow_missing = $var; - - return $this; - } - - /** - * Optional. If set to true and the aspect_keys specify aspect ranges, any - * existing aspects from that range not provided in the request will be - * deleted. - * - * Generated from protobuf field bool delete_missing_aspects = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getDeleteMissingAspects() - { - return $this->delete_missing_aspects; - } - - /** - * Optional. If set to true and the aspect_keys specify aspect ranges, any - * existing aspects from that range not provided in the request will be - * deleted. - * - * Generated from protobuf field bool delete_missing_aspects = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setDeleteMissingAspects($var) - { - GPBUtil::checkBool($var); - $this->delete_missing_aspects = $var; - - return $this; - } - - /** - * Optional. The map keys of the Aspects which should be modified. Supports - * the following syntaxes: - * * - matches aspect on given type and empty path - * * @path - matches aspect on given type and specified - * path - * * * - matches aspects on given type for all paths - * * *@path - matches aspects of all types on the given path - * Existing aspects matching the syntax will not be removed unless - * `delete_missing_aspects` is set to true. - * If this field is left empty, it will be treated as specifying exactly those - * Aspects present in the request. - * - * Generated from protobuf field repeated string aspect_keys = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAspectKeys() - { - return $this->aspect_keys; - } - - /** - * Optional. The map keys of the Aspects which should be modified. Supports - * the following syntaxes: - * * - matches aspect on given type and empty path - * * @path - matches aspect on given type and specified - * path - * * * - matches aspects on given type for all paths - * * *@path - matches aspects of all types on the given path - * Existing aspects matching the syntax will not be removed unless - * `delete_missing_aspects` is set to true. - * If this field is left empty, it will be treated as specifying exactly those - * Aspects present in the request. - * - * Generated from protobuf field repeated string aspect_keys = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAspectKeys($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->aspect_keys = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateEntryTypeRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateEntryTypeRequest.php deleted file mode 100644 index 5bf45c876e45..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateEntryTypeRequest.php +++ /dev/null @@ -1,174 +0,0 @@ -google.cloud.dataplex.v1.UpdateEntryTypeRequest - */ -class UpdateEntryTypeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. EntryType Resource - * - * Generated from protobuf field .google.cloud.dataplex.v1.EntryType entry_type = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $entry_type = null; - /** - * Required. Mask of fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validate_only = false; - - /** - * @param \Google\Cloud\Dataplex\V1\EntryType $entryType Required. EntryType Resource - * @param \Google\Protobuf\FieldMask $updateMask Required. Mask of fields to update. - * - * @return \Google\Cloud\Dataplex\V1\UpdateEntryTypeRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Dataplex\V1\EntryType $entryType, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setEntryType($entryType) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Dataplex\V1\EntryType $entry_type - * Required. EntryType Resource - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Mask of fields to update. - * @type bool $validate_only - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Catalog::initOnce(); - parent::__construct($data); - } - - /** - * Required. EntryType Resource - * - * Generated from protobuf field .google.cloud.dataplex.v1.EntryType entry_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataplex\V1\EntryType|null - */ - public function getEntryType() - { - return $this->entry_type; - } - - public function hasEntryType() - { - return isset($this->entry_type); - } - - public function clearEntryType() - { - unset($this->entry_type); - } - - /** - * Required. EntryType Resource - * - * Generated from protobuf field .google.cloud.dataplex.v1.EntryType entry_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataplex\V1\EntryType $var - * @return $this - */ - public function setEntryType($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\EntryType::class); - $this->entry_type = $var; - - return $this; - } - - /** - * Required. Mask of fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Required. Mask of fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateEnvironmentRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateEnvironmentRequest.php deleted file mode 100644 index 18909b9f1a6f..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateEnvironmentRequest.php +++ /dev/null @@ -1,179 +0,0 @@ -google.cloud.dataplex.v1.UpdateEnvironmentRequest - */ -class UpdateEnvironmentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Mask of fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Required. Update description. - * Only fields specified in `update_mask` are updated. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Environment environment = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $environment = null; - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validate_only = false; - - /** - * @param \Google\Cloud\Dataplex\V1\Environment $environment Required. Update description. - * Only fields specified in `update_mask` are updated. - * @param \Google\Protobuf\FieldMask $updateMask Required. Mask of fields to update. - * - * @return \Google\Cloud\Dataplex\V1\UpdateEnvironmentRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Dataplex\V1\Environment $environment, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setEnvironment($environment) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Mask of fields to update. - * @type \Google\Cloud\Dataplex\V1\Environment $environment - * Required. Update description. - * Only fields specified in `update_mask` are updated. - * @type bool $validate_only - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. Mask of fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Required. Mask of fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Required. Update description. - * Only fields specified in `update_mask` are updated. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Environment environment = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataplex\V1\Environment|null - */ - public function getEnvironment() - { - return $this->environment; - } - - public function hasEnvironment() - { - return isset($this->environment); - } - - public function clearEnvironment() - { - unset($this->environment); - } - - /** - * Required. Update description. - * Only fields specified in `update_mask` are updated. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Environment environment = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataplex\V1\Environment $var - * @return $this - */ - public function setEnvironment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Environment::class); - $this->environment = $var; - - return $this; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateLakeRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateLakeRequest.php deleted file mode 100644 index c5c44f9d47d7..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateLakeRequest.php +++ /dev/null @@ -1,179 +0,0 @@ -google.cloud.dataplex.v1.UpdateLakeRequest - */ -class UpdateLakeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Mask of fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Required. Update description. - * Only fields specified in `update_mask` are updated. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Lake lake = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $lake = null; - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validate_only = false; - - /** - * @param \Google\Cloud\Dataplex\V1\Lake $lake Required. Update description. - * Only fields specified in `update_mask` are updated. - * @param \Google\Protobuf\FieldMask $updateMask Required. Mask of fields to update. - * - * @return \Google\Cloud\Dataplex\V1\UpdateLakeRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Dataplex\V1\Lake $lake, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setLake($lake) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Mask of fields to update. - * @type \Google\Cloud\Dataplex\V1\Lake $lake - * Required. Update description. - * Only fields specified in `update_mask` are updated. - * @type bool $validate_only - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. Mask of fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Required. Mask of fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Required. Update description. - * Only fields specified in `update_mask` are updated. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Lake lake = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataplex\V1\Lake|null - */ - public function getLake() - { - return $this->lake; - } - - public function hasLake() - { - return isset($this->lake); - } - - public function clearLake() - { - unset($this->lake); - } - - /** - * Required. Update description. - * Only fields specified in `update_mask` are updated. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Lake lake = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataplex\V1\Lake $var - * @return $this - */ - public function setLake($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Lake::class); - $this->lake = $var; - - return $this; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateTaskRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateTaskRequest.php deleted file mode 100644 index 5d56568c9c29..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateTaskRequest.php +++ /dev/null @@ -1,179 +0,0 @@ -google.cloud.dataplex.v1.UpdateTaskRequest - */ -class UpdateTaskRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Mask of fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Required. Update description. - * Only fields specified in `update_mask` are updated. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Task task = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $task = null; - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validate_only = false; - - /** - * @param \Google\Cloud\Dataplex\V1\Task $task Required. Update description. - * Only fields specified in `update_mask` are updated. - * @param \Google\Protobuf\FieldMask $updateMask Required. Mask of fields to update. - * - * @return \Google\Cloud\Dataplex\V1\UpdateTaskRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Dataplex\V1\Task $task, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setTask($task) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Mask of fields to update. - * @type \Google\Cloud\Dataplex\V1\Task $task - * Required. Update description. - * Only fields specified in `update_mask` are updated. - * @type bool $validate_only - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. Mask of fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Required. Mask of fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Required. Update description. - * Only fields specified in `update_mask` are updated. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Task task = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataplex\V1\Task|null - */ - public function getTask() - { - return $this->task; - } - - public function hasTask() - { - return isset($this->task); - } - - public function clearTask() - { - unset($this->task); - } - - /** - * Required. Update description. - * Only fields specified in `update_mask` are updated. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Task task = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataplex\V1\Task $var - * @return $this - */ - public function setTask($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Task::class); - $this->task = $var; - - return $this; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateZoneRequest.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateZoneRequest.php deleted file mode 100644 index 9b7a5d586fa7..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/UpdateZoneRequest.php +++ /dev/null @@ -1,179 +0,0 @@ -google.cloud.dataplex.v1.UpdateZoneRequest - */ -class UpdateZoneRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Mask of fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Required. Update description. - * Only fields specified in `update_mask` are updated. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Zone zone = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $zone = null; - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validate_only = false; - - /** - * @param \Google\Cloud\Dataplex\V1\Zone $zone Required. Update description. - * Only fields specified in `update_mask` are updated. - * @param \Google\Protobuf\FieldMask $updateMask Required. Mask of fields to update. - * - * @return \Google\Cloud\Dataplex\V1\UpdateZoneRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Dataplex\V1\Zone $zone, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setZone($zone) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Mask of fields to update. - * @type \Google\Cloud\Dataplex\V1\Zone $zone - * Required. Update description. - * Only fields specified in `update_mask` are updated. - * @type bool $validate_only - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. Mask of fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Required. Mask of fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Required. Update description. - * Only fields specified in `update_mask` are updated. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Zone zone = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataplex\V1\Zone|null - */ - public function getZone() - { - return $this->zone; - } - - public function hasZone() - { - return isset($this->zone); - } - - public function clearZone() - { - unset($this->zone); - } - - /** - * Required. Update description. - * Only fields specified in `update_mask` are updated. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Zone zone = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataplex\V1\Zone $var - * @return $this - */ - public function setZone($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Zone::class); - $this->zone = $var; - - return $this; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Zone.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Zone.php deleted file mode 100644 index 271b517cd808..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Zone.php +++ /dev/null @@ -1,510 +0,0 @@ -google.cloud.dataplex.v1.Zone - */ -class Zone extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The relative resource name of the zone, of the form: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. User friendly display name. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $display_name = ''; - /** - * Output only. System generated globally unique ID for the zone. This ID will - * be different if the zone is deleted and re-created with the same name. - * - * Generated from protobuf field string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - /** - * Output only. The time when the zone was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time when the zone was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Optional. User defined labels for the zone. - * - * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * Optional. Description of the zone. - * - * Generated from protobuf field string description = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Output only. Current state of the zone. - * - * Generated from protobuf field .google.cloud.dataplex.v1.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Required. Immutable. The type of the zone. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Zone.Type type = 9 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - */ - protected $type = 0; - /** - * Optional. Specification of the discovery feature applied to data in this - * zone. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Zone.DiscoverySpec discovery_spec = 103 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $discovery_spec = null; - /** - * Required. Specification of the resources that are referenced by the assets - * within this zone. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Zone.ResourceSpec resource_spec = 104 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $resource_spec = null; - /** - * Output only. Aggregated status of the underlying assets of the zone. - * - * Generated from protobuf field .google.cloud.dataplex.v1.AssetStatus asset_status = 105 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $asset_status = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The relative resource name of the zone, of the form: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * @type string $display_name - * Optional. User friendly display name. - * @type string $uid - * Output only. System generated globally unique ID for the zone. This ID will - * be different if the zone is deleted and re-created with the same name. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time when the zone was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time when the zone was last updated. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. User defined labels for the zone. - * @type string $description - * Optional. Description of the zone. - * @type int $state - * Output only. Current state of the zone. - * @type int $type - * Required. Immutable. The type of the zone. - * @type \Google\Cloud\Dataplex\V1\Zone\DiscoverySpec $discovery_spec - * Optional. Specification of the discovery feature applied to data in this - * zone. - * @type \Google\Cloud\Dataplex\V1\Zone\ResourceSpec $resource_spec - * Required. Specification of the resources that are referenced by the assets - * within this zone. - * @type \Google\Cloud\Dataplex\V1\AssetStatus $asset_status - * Output only. Aggregated status of the underlying assets of the zone. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The relative resource name of the zone, of the form: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The relative resource name of the zone, of the form: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. User friendly display name. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Optional. User friendly display name. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Output only. System generated globally unique ID for the zone. This ID will - * be different if the zone is deleted and re-created with the same name. - * - * Generated from protobuf field string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. System generated globally unique ID for the zone. This ID will - * be different if the zone is deleted and re-created with the same name. - * - * Generated from protobuf field string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - - /** - * Output only. The time when the zone was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time when the zone was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The time when the zone was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The time when the zone was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Optional. User defined labels for the zone. - * - * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. User defined labels for the zone. - * - * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Optional. Description of the zone. - * - * Generated from protobuf field string description = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. Description of the zone. - * - * Generated from protobuf field string description = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Output only. Current state of the zone. - * - * Generated from protobuf field .google.cloud.dataplex.v1.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. Current state of the zone. - * - * Generated from protobuf field .google.cloud.dataplex.v1.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\State::class); - $this->state = $var; - - return $this; - } - - /** - * Required. Immutable. The type of the zone. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Zone.Type type = 9 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Required. Immutable. The type of the zone. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Zone.Type type = 9 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\Zone\Type::class); - $this->type = $var; - - return $this; - } - - /** - * Optional. Specification of the discovery feature applied to data in this - * zone. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Zone.DiscoverySpec discovery_spec = 103 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataplex\V1\Zone\DiscoverySpec|null - */ - public function getDiscoverySpec() - { - return $this->discovery_spec; - } - - public function hasDiscoverySpec() - { - return isset($this->discovery_spec); - } - - public function clearDiscoverySpec() - { - unset($this->discovery_spec); - } - - /** - * Optional. Specification of the discovery feature applied to data in this - * zone. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Zone.DiscoverySpec discovery_spec = 103 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataplex\V1\Zone\DiscoverySpec $var - * @return $this - */ - public function setDiscoverySpec($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Zone\DiscoverySpec::class); - $this->discovery_spec = $var; - - return $this; - } - - /** - * Required. Specification of the resources that are referenced by the assets - * within this zone. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Zone.ResourceSpec resource_spec = 104 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Dataplex\V1\Zone\ResourceSpec|null - */ - public function getResourceSpec() - { - return $this->resource_spec; - } - - public function hasResourceSpec() - { - return isset($this->resource_spec); - } - - public function clearResourceSpec() - { - unset($this->resource_spec); - } - - /** - * Required. Specification of the resources that are referenced by the assets - * within this zone. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Zone.ResourceSpec resource_spec = 104 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Dataplex\V1\Zone\ResourceSpec $var - * @return $this - */ - public function setResourceSpec($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Zone\ResourceSpec::class); - $this->resource_spec = $var; - - return $this; - } - - /** - * Output only. Aggregated status of the underlying assets of the zone. - * - * Generated from protobuf field .google.cloud.dataplex.v1.AssetStatus asset_status = 105 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Dataplex\V1\AssetStatus|null - */ - public function getAssetStatus() - { - return $this->asset_status; - } - - public function hasAssetStatus() - { - return isset($this->asset_status); - } - - public function clearAssetStatus() - { - unset($this->asset_status); - } - - /** - * Output only. Aggregated status of the underlying assets of the zone. - * - * Generated from protobuf field .google.cloud.dataplex.v1.AssetStatus asset_status = 105 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Dataplex\V1\AssetStatus $var - * @return $this - */ - public function setAssetStatus($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\AssetStatus::class); - $this->asset_status = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Zone/DiscoverySpec.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Zone/DiscoverySpec.php deleted file mode 100644 index 798a3a5f6b4a..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Zone/DiscoverySpec.php +++ /dev/null @@ -1,317 +0,0 @@ -google.cloud.dataplex.v1.Zone.DiscoverySpec - */ -class DiscoverySpec extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Whether discovery is enabled. - * - * Generated from protobuf field bool enabled = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $enabled = false; - /** - * Optional. The list of patterns to apply for selecting data to include - * during discovery if only a subset of the data should considered. For - * Cloud Storage bucket assets, these are interpreted as glob patterns used - * to match object names. For BigQuery dataset assets, these are interpreted - * as patterns to match table names. - * - * Generated from protobuf field repeated string include_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $include_patterns; - /** - * Optional. The list of patterns to apply for selecting data to exclude - * during discovery. For Cloud Storage bucket assets, these are interpreted - * as glob patterns used to match object names. For BigQuery dataset assets, - * these are interpreted as patterns to match table names. - * - * Generated from protobuf field repeated string exclude_patterns = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $exclude_patterns; - /** - * Optional. Configuration for CSV data. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions csv_options = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $csv_options = null; - /** - * Optional. Configuration for Json data. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions json_options = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $json_options = null; - protected $trigger; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $enabled - * Required. Whether discovery is enabled. - * @type array|\Google\Protobuf\Internal\RepeatedField $include_patterns - * Optional. The list of patterns to apply for selecting data to include - * during discovery if only a subset of the data should considered. For - * Cloud Storage bucket assets, these are interpreted as glob patterns used - * to match object names. For BigQuery dataset assets, these are interpreted - * as patterns to match table names. - * @type array|\Google\Protobuf\Internal\RepeatedField $exclude_patterns - * Optional. The list of patterns to apply for selecting data to exclude - * during discovery. For Cloud Storage bucket assets, these are interpreted - * as glob patterns used to match object names. For BigQuery dataset assets, - * these are interpreted as patterns to match table names. - * @type \Google\Cloud\Dataplex\V1\Zone\DiscoverySpec\CsvOptions $csv_options - * Optional. Configuration for CSV data. - * @type \Google\Cloud\Dataplex\V1\Zone\DiscoverySpec\JsonOptions $json_options - * Optional. Configuration for Json data. - * @type string $schedule - * Optional. Cron schedule (https://en.wikipedia.org/wiki/Cron) for - * running discovery periodically. Successive discovery runs must be - * scheduled at least 60 minutes apart. The default value is to run - * discovery every 60 minutes. To explicitly set a timezone to the cron - * tab, apply a prefix in the cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or - * TZ=${IANA_TIME_ZONE}". The ${IANA_TIME_ZONE} may only be a valid string - * from IANA time zone database. For example, `CRON_TZ=America/New_York 1 - * * * * *`, or `TZ=America/New_York 1 * * * *`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Required. Whether discovery is enabled. - * - * Generated from protobuf field bool enabled = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return bool - */ - public function getEnabled() - { - return $this->enabled; - } - - /** - * Required. Whether discovery is enabled. - * - * Generated from protobuf field bool enabled = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param bool $var - * @return $this - */ - public function setEnabled($var) - { - GPBUtil::checkBool($var); - $this->enabled = $var; - - return $this; - } - - /** - * Optional. The list of patterns to apply for selecting data to include - * during discovery if only a subset of the data should considered. For - * Cloud Storage bucket assets, these are interpreted as glob patterns used - * to match object names. For BigQuery dataset assets, these are interpreted - * as patterns to match table names. - * - * Generated from protobuf field repeated string include_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getIncludePatterns() - { - return $this->include_patterns; - } - - /** - * Optional. The list of patterns to apply for selecting data to include - * during discovery if only a subset of the data should considered. For - * Cloud Storage bucket assets, these are interpreted as glob patterns used - * to match object names. For BigQuery dataset assets, these are interpreted - * as patterns to match table names. - * - * Generated from protobuf field repeated string include_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setIncludePatterns($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->include_patterns = $arr; - - return $this; - } - - /** - * Optional. The list of patterns to apply for selecting data to exclude - * during discovery. For Cloud Storage bucket assets, these are interpreted - * as glob patterns used to match object names. For BigQuery dataset assets, - * these are interpreted as patterns to match table names. - * - * Generated from protobuf field repeated string exclude_patterns = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getExcludePatterns() - { - return $this->exclude_patterns; - } - - /** - * Optional. The list of patterns to apply for selecting data to exclude - * during discovery. For Cloud Storage bucket assets, these are interpreted - * as glob patterns used to match object names. For BigQuery dataset assets, - * these are interpreted as patterns to match table names. - * - * Generated from protobuf field repeated string exclude_patterns = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setExcludePatterns($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->exclude_patterns = $arr; - - return $this; - } - - /** - * Optional. Configuration for CSV data. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions csv_options = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataplex\V1\Zone\DiscoverySpec\CsvOptions|null - */ - public function getCsvOptions() - { - return $this->csv_options; - } - - public function hasCsvOptions() - { - return isset($this->csv_options); - } - - public function clearCsvOptions() - { - unset($this->csv_options); - } - - /** - * Optional. Configuration for CSV data. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions csv_options = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataplex\V1\Zone\DiscoverySpec\CsvOptions $var - * @return $this - */ - public function setCsvOptions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Zone\DiscoverySpec\CsvOptions::class); - $this->csv_options = $var; - - return $this; - } - - /** - * Optional. Configuration for Json data. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions json_options = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Dataplex\V1\Zone\DiscoverySpec\JsonOptions|null - */ - public function getJsonOptions() - { - return $this->json_options; - } - - public function hasJsonOptions() - { - return isset($this->json_options); - } - - public function clearJsonOptions() - { - unset($this->json_options); - } - - /** - * Optional. Configuration for Json data. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions json_options = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Dataplex\V1\Zone\DiscoverySpec\JsonOptions $var - * @return $this - */ - public function setJsonOptions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Zone\DiscoverySpec\JsonOptions::class); - $this->json_options = $var; - - return $this; - } - - /** - * Optional. Cron schedule (https://en.wikipedia.org/wiki/Cron) for - * running discovery periodically. Successive discovery runs must be - * scheduled at least 60 minutes apart. The default value is to run - * discovery every 60 minutes. To explicitly set a timezone to the cron - * tab, apply a prefix in the cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or - * TZ=${IANA_TIME_ZONE}". The ${IANA_TIME_ZONE} may only be a valid string - * from IANA time zone database. For example, `CRON_TZ=America/New_York 1 - * * * * *`, or `TZ=America/New_York 1 * * * *`. - * - * Generated from protobuf field string schedule = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getSchedule() - { - return $this->readOneof(10); - } - - public function hasSchedule() - { - return $this->hasOneof(10); - } - - /** - * Optional. Cron schedule (https://en.wikipedia.org/wiki/Cron) for - * running discovery periodically. Successive discovery runs must be - * scheduled at least 60 minutes apart. The default value is to run - * discovery every 60 minutes. To explicitly set a timezone to the cron - * tab, apply a prefix in the cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or - * TZ=${IANA_TIME_ZONE}". The ${IANA_TIME_ZONE} may only be a valid string - * from IANA time zone database. For example, `CRON_TZ=America/New_York 1 - * * * * *`, or `TZ=America/New_York 1 * * * *`. - * - * Generated from protobuf field string schedule = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setSchedule($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(10, $var); - - return $this; - } - - /** - * @return string - */ - public function getTrigger() - { - return $this->whichOneof("trigger"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DiscoverySpec::class, \Google\Cloud\Dataplex\V1\Zone_DiscoverySpec::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Zone/DiscoverySpec/CsvOptions.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Zone/DiscoverySpec/CsvOptions.php deleted file mode 100644 index fe2a4ee14034..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Zone/DiscoverySpec/CsvOptions.php +++ /dev/null @@ -1,184 +0,0 @@ -google.cloud.dataplex.v1.Zone.DiscoverySpec.CsvOptions - */ -class CsvOptions extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The number of rows to interpret as header rows that should be - * skipped when reading data rows. - * - * Generated from protobuf field int32 header_rows = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $header_rows = 0; - /** - * Optional. The delimiter being used to separate values. This defaults to - * ','. - * - * Generated from protobuf field string delimiter = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $delimiter = ''; - /** - * Optional. The character encoding of the data. The default is UTF-8. - * - * Generated from protobuf field string encoding = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $encoding = ''; - /** - * Optional. Whether to disable the inference of data type for CSV data. - * If true, all columns will be registered as strings. - * - * Generated from protobuf field bool disable_type_inference = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $disable_type_inference = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $header_rows - * Optional. The number of rows to interpret as header rows that should be - * skipped when reading data rows. - * @type string $delimiter - * Optional. The delimiter being used to separate values. This defaults to - * ','. - * @type string $encoding - * Optional. The character encoding of the data. The default is UTF-8. - * @type bool $disable_type_inference - * Optional. Whether to disable the inference of data type for CSV data. - * If true, all columns will be registered as strings. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The number of rows to interpret as header rows that should be - * skipped when reading data rows. - * - * Generated from protobuf field int32 header_rows = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getHeaderRows() - { - return $this->header_rows; - } - - /** - * Optional. The number of rows to interpret as header rows that should be - * skipped when reading data rows. - * - * Generated from protobuf field int32 header_rows = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setHeaderRows($var) - { - GPBUtil::checkInt32($var); - $this->header_rows = $var; - - return $this; - } - - /** - * Optional. The delimiter being used to separate values. This defaults to - * ','. - * - * Generated from protobuf field string delimiter = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDelimiter() - { - return $this->delimiter; - } - - /** - * Optional. The delimiter being used to separate values. This defaults to - * ','. - * - * Generated from protobuf field string delimiter = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDelimiter($var) - { - GPBUtil::checkString($var, True); - $this->delimiter = $var; - - return $this; - } - - /** - * Optional. The character encoding of the data. The default is UTF-8. - * - * Generated from protobuf field string encoding = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getEncoding() - { - return $this->encoding; - } - - /** - * Optional. The character encoding of the data. The default is UTF-8. - * - * Generated from protobuf field string encoding = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setEncoding($var) - { - GPBUtil::checkString($var, True); - $this->encoding = $var; - - return $this; - } - - /** - * Optional. Whether to disable the inference of data type for CSV data. - * If true, all columns will be registered as strings. - * - * Generated from protobuf field bool disable_type_inference = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getDisableTypeInference() - { - return $this->disable_type_inference; - } - - /** - * Optional. Whether to disable the inference of data type for CSV data. - * If true, all columns will be registered as strings. - * - * Generated from protobuf field bool disable_type_inference = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setDisableTypeInference($var) - { - GPBUtil::checkBool($var); - $this->disable_type_inference = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CsvOptions::class, \Google\Cloud\Dataplex\V1\Zone_DiscoverySpec_CsvOptions::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Zone/DiscoverySpec/JsonOptions.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Zone/DiscoverySpec/JsonOptions.php deleted file mode 100644 index 8d990855a450..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Zone/DiscoverySpec/JsonOptions.php +++ /dev/null @@ -1,112 +0,0 @@ -google.cloud.dataplex.v1.Zone.DiscoverySpec.JsonOptions - */ -class JsonOptions extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The character encoding of the data. The default is UTF-8. - * - * Generated from protobuf field string encoding = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $encoding = ''; - /** - * Optional. Whether to disable the inference of data type for Json data. - * If true, all columns will be registered as their primitive types - * (strings, number or boolean). - * - * Generated from protobuf field bool disable_type_inference = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $disable_type_inference = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $encoding - * Optional. The character encoding of the data. The default is UTF-8. - * @type bool $disable_type_inference - * Optional. Whether to disable the inference of data type for Json data. - * If true, all columns will be registered as their primitive types - * (strings, number or boolean). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The character encoding of the data. The default is UTF-8. - * - * Generated from protobuf field string encoding = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getEncoding() - { - return $this->encoding; - } - - /** - * Optional. The character encoding of the data. The default is UTF-8. - * - * Generated from protobuf field string encoding = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setEncoding($var) - { - GPBUtil::checkString($var, True); - $this->encoding = $var; - - return $this; - } - - /** - * Optional. Whether to disable the inference of data type for Json data. - * If true, all columns will be registered as their primitive types - * (strings, number or boolean). - * - * Generated from protobuf field bool disable_type_inference = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getDisableTypeInference() - { - return $this->disable_type_inference; - } - - /** - * Optional. Whether to disable the inference of data type for Json data. - * If true, all columns will be registered as their primitive types - * (strings, number or boolean). - * - * Generated from protobuf field bool disable_type_inference = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setDisableTypeInference($var) - { - GPBUtil::checkBool($var); - $this->disable_type_inference = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(JsonOptions::class, \Google\Cloud\Dataplex\V1\Zone_DiscoverySpec_JsonOptions::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Zone/ResourceSpec.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Zone/ResourceSpec.php deleted file mode 100644 index e36f7d5ebfb3..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Zone/ResourceSpec.php +++ /dev/null @@ -1,74 +0,0 @@ -google.cloud.dataplex.v1.Zone.ResourceSpec - */ -class ResourceSpec extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Immutable. The location type of the resources that are allowed - * to be attached to the assets within this zone. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Zone.ResourceSpec.LocationType location_type = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - */ - protected $location_type = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $location_type - * Required. Immutable. The location type of the resources that are allowed - * to be attached to the assets within this zone. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Dataplex\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Required. Immutable. The location type of the resources that are allowed - * to be attached to the assets within this zone. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Zone.ResourceSpec.LocationType location_type = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @return int - */ - public function getLocationType() - { - return $this->location_type; - } - - /** - * Required. Immutable. The location type of the resources that are allowed - * to be attached to the assets within this zone. - * - * Generated from protobuf field .google.cloud.dataplex.v1.Zone.ResourceSpec.LocationType location_type = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @param int $var - * @return $this - */ - public function setLocationType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Dataplex\V1\Zone\ResourceSpec\LocationType::class); - $this->location_type = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ResourceSpec::class, \Google\Cloud\Dataplex\V1\Zone_ResourceSpec::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Zone/ResourceSpec/LocationType.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Zone/ResourceSpec/LocationType.php deleted file mode 100644 index 4720281da7ba..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Zone/ResourceSpec/LocationType.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.dataplex.v1.Zone.ResourceSpec.LocationType - */ -class LocationType -{ - /** - * Unspecified location type. - * - * Generated from protobuf enum LOCATION_TYPE_UNSPECIFIED = 0; - */ - const LOCATION_TYPE_UNSPECIFIED = 0; - /** - * Resources that are associated with a single region. - * - * Generated from protobuf enum SINGLE_REGION = 1; - */ - const SINGLE_REGION = 1; - /** - * Resources that are associated with a multi-region location. - * - * Generated from protobuf enum MULTI_REGION = 2; - */ - const MULTI_REGION = 2; - - private static $valueToName = [ - self::LOCATION_TYPE_UNSPECIFIED => 'LOCATION_TYPE_UNSPECIFIED', - self::SINGLE_REGION => 'SINGLE_REGION', - self::MULTI_REGION => 'MULTI_REGION', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(LocationType::class, \Google\Cloud\Dataplex\V1\Zone_ResourceSpec_LocationType::class); - diff --git a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Zone/Type.php b/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Zone/Type.php deleted file mode 100644 index dca85b04561e..000000000000 --- a/owl-bot-staging/Dataplex/v1/proto/src/Google/Cloud/Dataplex/V1/Zone/Type.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.dataplex.v1.Zone.Type - */ -class Type -{ - /** - * Zone type not specified. - * - * Generated from protobuf enum TYPE_UNSPECIFIED = 0; - */ - const TYPE_UNSPECIFIED = 0; - /** - * A zone that contains data that needs further processing before it is - * considered generally ready for consumption and analytics workloads. - * - * Generated from protobuf enum RAW = 1; - */ - const RAW = 1; - /** - * A zone that contains data that is considered to be ready for broader - * consumption and analytics workloads. Curated structured data stored in - * Cloud Storage must conform to certain file formats (parquet, avro and - * orc) and organized in a hive-compatible directory layout. - * - * Generated from protobuf enum CURATED = 2; - */ - const CURATED = 2; - - private static $valueToName = [ - self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', - self::RAW => 'RAW', - self::CURATED => 'CURATED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Type::class, \Google\Cloud\Dataplex\V1\Zone_Type::class); - diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/CatalogServiceClient/create_aspect_type.php b/owl-bot-staging/Dataplex/v1/samples/V1/CatalogServiceClient/create_aspect_type.php deleted file mode 100644 index e41837c7836f..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/CatalogServiceClient/create_aspect_type.php +++ /dev/null @@ -1,112 +0,0 @@ -setName($aspectTypeMetadataTemplateName) - ->setType($aspectTypeMetadataTemplateType); - $aspectType = (new AspectType()) - ->setMetadataTemplate($aspectTypeMetadataTemplate); - $request = (new CreateAspectTypeRequest()) - ->setParent($formattedParent) - ->setAspectTypeId($aspectTypeId) - ->setAspectType($aspectType); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $catalogServiceClient->createAspectType($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var AspectType $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = CatalogServiceClient::locationName('[PROJECT]', '[LOCATION]'); - $aspectTypeId = '[ASPECT_TYPE_ID]'; - $aspectTypeMetadataTemplateName = '[NAME]'; - $aspectTypeMetadataTemplateType = '[TYPE]'; - - create_aspect_type_sample( - $formattedParent, - $aspectTypeId, - $aspectTypeMetadataTemplateName, - $aspectTypeMetadataTemplateType - ); -} -// [END dataplex_v1_generated_CatalogService_CreateAspectType_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/CatalogServiceClient/create_entry.php b/owl-bot-staging/Dataplex/v1/samples/V1/CatalogServiceClient/create_entry.php deleted file mode 100644 index b507dcca259d..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/CatalogServiceClient/create_entry.php +++ /dev/null @@ -1,102 +0,0 @@ -setEntryType($entryEntryType); - $request = (new CreateEntryRequest()) - ->setParent($formattedParent) - ->setEntryId($entryId) - ->setEntry($entry); - - // Call the API and handle any network failures. - try { - /** @var Entry $response */ - $response = $catalogServiceClient->createEntry($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = CatalogServiceClient::entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); - $entryId = '[ENTRY_ID]'; - $entryEntryType = '[ENTRY_TYPE]'; - - create_entry_sample($formattedParent, $entryId, $entryEntryType); -} -// [END dataplex_v1_generated_CatalogService_CreateEntry_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/CatalogServiceClient/create_entry_group.php b/owl-bot-staging/Dataplex/v1/samples/V1/CatalogServiceClient/create_entry_group.php deleted file mode 100644 index b9d9e9576347..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/CatalogServiceClient/create_entry_group.php +++ /dev/null @@ -1,90 +0,0 @@ -setParent($formattedParent) - ->setEntryGroupId($entryGroupId) - ->setEntryGroup($entryGroup); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $catalogServiceClient->createEntryGroup($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var EntryGroup $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = CatalogServiceClient::locationName('[PROJECT]', '[LOCATION]'); - $entryGroupId = '[ENTRY_GROUP_ID]'; - - create_entry_group_sample($formattedParent, $entryGroupId); -} -// [END dataplex_v1_generated_CatalogService_CreateEntryGroup_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/CatalogServiceClient/create_entry_type.php b/owl-bot-staging/Dataplex/v1/samples/V1/CatalogServiceClient/create_entry_type.php deleted file mode 100644 index 126853c88d30..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/CatalogServiceClient/create_entry_type.php +++ /dev/null @@ -1,90 +0,0 @@ -setParent($formattedParent) - ->setEntryTypeId($entryTypeId) - ->setEntryType($entryType); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $catalogServiceClient->createEntryType($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var EntryType $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = CatalogServiceClient::locationName('[PROJECT]', '[LOCATION]'); - $entryTypeId = '[ENTRY_TYPE_ID]'; - - create_entry_type_sample($formattedParent, $entryTypeId); -} -// [END dataplex_v1_generated_CatalogService_CreateEntryType_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/CatalogServiceClient/delete_aspect_type.php b/owl-bot-staging/Dataplex/v1/samples/V1/CatalogServiceClient/delete_aspect_type.php deleted file mode 100644 index 23789bc8760f..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/CatalogServiceClient/delete_aspect_type.php +++ /dev/null @@ -1,81 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $catalogServiceClient->deleteAspectType($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = CatalogServiceClient::aspectTypeName('[PROJECT]', '[LOCATION]', '[ASPECT_TYPE]'); - - delete_aspect_type_sample($formattedName); -} -// [END dataplex_v1_generated_CatalogService_DeleteAspectType_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/CatalogServiceClient/delete_entry.php b/owl-bot-staging/Dataplex/v1/samples/V1/CatalogServiceClient/delete_entry.php deleted file mode 100644 index f060d65f0ae0..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/CatalogServiceClient/delete_entry.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Entry $response */ - $response = $catalogServiceClient->deleteEntry($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = CatalogServiceClient::entryName( - '[PROJECT]', - '[LOCATION]', - '[ENTRY_GROUP]', - '[ENTRY]' - ); - - delete_entry_sample($formattedName); -} -// [END dataplex_v1_generated_CatalogService_DeleteEntry_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/CatalogServiceClient/delete_entry_group.php b/owl-bot-staging/Dataplex/v1/samples/V1/CatalogServiceClient/delete_entry_group.php deleted file mode 100644 index 20f360eb34d7..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/CatalogServiceClient/delete_entry_group.php +++ /dev/null @@ -1,81 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $catalogServiceClient->deleteEntryGroup($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = CatalogServiceClient::entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); - - delete_entry_group_sample($formattedName); -} -// [END dataplex_v1_generated_CatalogService_DeleteEntryGroup_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/CatalogServiceClient/delete_entry_type.php b/owl-bot-staging/Dataplex/v1/samples/V1/CatalogServiceClient/delete_entry_type.php deleted file mode 100644 index 11d63b25acf5..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/CatalogServiceClient/delete_entry_type.php +++ /dev/null @@ -1,81 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $catalogServiceClient->deleteEntryType($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = CatalogServiceClient::entryTypeName('[PROJECT]', '[LOCATION]', '[ENTRY_TYPE]'); - - delete_entry_type_sample($formattedName); -} -// [END dataplex_v1_generated_CatalogService_DeleteEntryType_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/CatalogServiceClient/get_aspect_type.php b/owl-bot-staging/Dataplex/v1/samples/V1/CatalogServiceClient/get_aspect_type.php deleted file mode 100644 index ab19a09fca8d..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/CatalogServiceClient/get_aspect_type.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var AspectType $response */ - $response = $catalogServiceClient->getAspectType($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = CatalogServiceClient::aspectTypeName('[PROJECT]', '[LOCATION]', '[ASPECT_TYPE]'); - - get_aspect_type_sample($formattedName); -} -// [END dataplex_v1_generated_CatalogService_GetAspectType_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/CatalogServiceClient/get_entry.php b/owl-bot-staging/Dataplex/v1/samples/V1/CatalogServiceClient/get_entry.php deleted file mode 100644 index 18eca4446f59..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/CatalogServiceClient/get_entry.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Entry $response */ - $response = $catalogServiceClient->getEntry($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = CatalogServiceClient::entryName( - '[PROJECT]', - '[LOCATION]', - '[ENTRY_GROUP]', - '[ENTRY]' - ); - - get_entry_sample($formattedName); -} -// [END dataplex_v1_generated_CatalogService_GetEntry_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/CatalogServiceClient/get_entry_group.php b/owl-bot-staging/Dataplex/v1/samples/V1/CatalogServiceClient/get_entry_group.php deleted file mode 100644 index 3242cd4328c0..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/CatalogServiceClient/get_entry_group.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var EntryGroup $response */ - $response = $catalogServiceClient->getEntryGroup($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = CatalogServiceClient::entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); - - get_entry_group_sample($formattedName); -} -// [END dataplex_v1_generated_CatalogService_GetEntryGroup_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/CatalogServiceClient/get_entry_type.php b/owl-bot-staging/Dataplex/v1/samples/V1/CatalogServiceClient/get_entry_type.php deleted file mode 100644 index a6176b0d65b8..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/CatalogServiceClient/get_entry_type.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var EntryType $response */ - $response = $catalogServiceClient->getEntryType($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = CatalogServiceClient::entryTypeName('[PROJECT]', '[LOCATION]', '[ENTRY_TYPE]'); - - get_entry_type_sample($formattedName); -} -// [END dataplex_v1_generated_CatalogService_GetEntryType_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/CatalogServiceClient/get_iam_policy.php b/owl-bot-staging/Dataplex/v1/samples/V1/CatalogServiceClient/get_iam_policy.php deleted file mode 100644 index 8872ad64d3d2..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/CatalogServiceClient/get_iam_policy.php +++ /dev/null @@ -1,72 +0,0 @@ -setResource($resource); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $catalogServiceClient->getIamPolicy($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - get_iam_policy_sample($resource); -} -// [END dataplex_v1_generated_CatalogService_GetIamPolicy_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/CatalogServiceClient/get_location.php b/owl-bot-staging/Dataplex/v1/samples/V1/CatalogServiceClient/get_location.php deleted file mode 100644 index fe7d87f6e134..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/CatalogServiceClient/get_location.php +++ /dev/null @@ -1,57 +0,0 @@ -getLocation($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END dataplex_v1_generated_CatalogService_GetLocation_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/CatalogServiceClient/list_aspect_types.php b/owl-bot-staging/Dataplex/v1/samples/V1/CatalogServiceClient/list_aspect_types.php deleted file mode 100644 index 7c5744ed0e28..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/CatalogServiceClient/list_aspect_types.php +++ /dev/null @@ -1,78 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $catalogServiceClient->listAspectTypes($request); - - /** @var AspectType $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = CatalogServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - list_aspect_types_sample($formattedParent); -} -// [END dataplex_v1_generated_CatalogService_ListAspectTypes_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/CatalogServiceClient/list_entries.php b/owl-bot-staging/Dataplex/v1/samples/V1/CatalogServiceClient/list_entries.php deleted file mode 100644 index 7853c5b30725..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/CatalogServiceClient/list_entries.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $catalogServiceClient->listEntries($request); - - /** @var Entry $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = CatalogServiceClient::entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); - - list_entries_sample($formattedParent); -} -// [END dataplex_v1_generated_CatalogService_ListEntries_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/CatalogServiceClient/list_entry_groups.php b/owl-bot-staging/Dataplex/v1/samples/V1/CatalogServiceClient/list_entry_groups.php deleted file mode 100644 index faf00110727c..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/CatalogServiceClient/list_entry_groups.php +++ /dev/null @@ -1,78 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $catalogServiceClient->listEntryGroups($request); - - /** @var EntryGroup $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = CatalogServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - list_entry_groups_sample($formattedParent); -} -// [END dataplex_v1_generated_CatalogService_ListEntryGroups_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/CatalogServiceClient/list_entry_types.php b/owl-bot-staging/Dataplex/v1/samples/V1/CatalogServiceClient/list_entry_types.php deleted file mode 100644 index 2c0fdd652f62..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/CatalogServiceClient/list_entry_types.php +++ /dev/null @@ -1,78 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $catalogServiceClient->listEntryTypes($request); - - /** @var EntryType $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = CatalogServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - list_entry_types_sample($formattedParent); -} -// [END dataplex_v1_generated_CatalogService_ListEntryTypes_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/CatalogServiceClient/list_locations.php b/owl-bot-staging/Dataplex/v1/samples/V1/CatalogServiceClient/list_locations.php deleted file mode 100644 index 35b3e6d39b37..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/CatalogServiceClient/list_locations.php +++ /dev/null @@ -1,62 +0,0 @@ -listLocations($request); - - /** @var Location $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END dataplex_v1_generated_CatalogService_ListLocations_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/CatalogServiceClient/lookup_entry.php b/owl-bot-staging/Dataplex/v1/samples/V1/CatalogServiceClient/lookup_entry.php deleted file mode 100644 index 2cb2ccaf84db..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/CatalogServiceClient/lookup_entry.php +++ /dev/null @@ -1,81 +0,0 @@ -setName($name) - ->setEntry($formattedEntry); - - // Call the API and handle any network failures. - try { - /** @var Entry $response */ - $response = $catalogServiceClient->lookupEntry($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $name = '[NAME]'; - $formattedEntry = CatalogServiceClient::entryName( - '[PROJECT]', - '[LOCATION]', - '[ENTRY_GROUP]', - '[ENTRY]' - ); - - lookup_entry_sample($name, $formattedEntry); -} -// [END dataplex_v1_generated_CatalogService_LookupEntry_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/CatalogServiceClient/search_entries.php b/owl-bot-staging/Dataplex/v1/samples/V1/CatalogServiceClient/search_entries.php deleted file mode 100644 index f60465334282..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/CatalogServiceClient/search_entries.php +++ /dev/null @@ -1,79 +0,0 @@ -setName($name) - ->setQuery($query); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $catalogServiceClient->searchEntries($request); - - /** @var SearchEntriesResult $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $name = '[NAME]'; - $query = '[QUERY]'; - - search_entries_sample($name, $query); -} -// [END dataplex_v1_generated_CatalogService_SearchEntries_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/CatalogServiceClient/set_iam_policy.php b/owl-bot-staging/Dataplex/v1/samples/V1/CatalogServiceClient/set_iam_policy.php deleted file mode 100644 index 8c7941b98509..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/CatalogServiceClient/set_iam_policy.php +++ /dev/null @@ -1,77 +0,0 @@ -setResource($resource) - ->setPolicy($policy); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $catalogServiceClient->setIamPolicy($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - set_iam_policy_sample($resource); -} -// [END dataplex_v1_generated_CatalogService_SetIamPolicy_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/CatalogServiceClient/test_iam_permissions.php b/owl-bot-staging/Dataplex/v1/samples/V1/CatalogServiceClient/test_iam_permissions.php deleted file mode 100644 index a7f20583aa32..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/CatalogServiceClient/test_iam_permissions.php +++ /dev/null @@ -1,84 +0,0 @@ -setResource($resource) - ->setPermissions($permissions); - - // Call the API and handle any network failures. - try { - /** @var TestIamPermissionsResponse $response */ - $response = $catalogServiceClient->testIamPermissions($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - $permissionsElement = '[PERMISSIONS]'; - - test_iam_permissions_sample($resource, $permissionsElement); -} -// [END dataplex_v1_generated_CatalogService_TestIamPermissions_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/CatalogServiceClient/update_aspect_type.php b/owl-bot-staging/Dataplex/v1/samples/V1/CatalogServiceClient/update_aspect_type.php deleted file mode 100644 index d4a317be61b1..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/CatalogServiceClient/update_aspect_type.php +++ /dev/null @@ -1,99 +0,0 @@ -setName($aspectTypeMetadataTemplateName) - ->setType($aspectTypeMetadataTemplateType); - $aspectType = (new AspectType()) - ->setMetadataTemplate($aspectTypeMetadataTemplate); - $updateMask = new FieldMask(); - $request = (new UpdateAspectTypeRequest()) - ->setAspectType($aspectType) - ->setUpdateMask($updateMask); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $catalogServiceClient->updateAspectType($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var AspectType $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $aspectTypeMetadataTemplateName = '[NAME]'; - $aspectTypeMetadataTemplateType = '[TYPE]'; - - update_aspect_type_sample($aspectTypeMetadataTemplateName, $aspectTypeMetadataTemplateType); -} -// [END dataplex_v1_generated_CatalogService_UpdateAspectType_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/CatalogServiceClient/update_entry.php b/owl-bot-staging/Dataplex/v1/samples/V1/CatalogServiceClient/update_entry.php deleted file mode 100644 index f2eeb6146aa8..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/CatalogServiceClient/update_entry.php +++ /dev/null @@ -1,73 +0,0 @@ -setEntryType($entryEntryType); - $request = (new UpdateEntryRequest()) - ->setEntry($entry); - - // Call the API and handle any network failures. - try { - /** @var Entry $response */ - $response = $catalogServiceClient->updateEntry($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $entryEntryType = '[ENTRY_TYPE]'; - - update_entry_sample($entryEntryType); -} -// [END dataplex_v1_generated_CatalogService_UpdateEntry_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/CatalogServiceClient/update_entry_group.php b/owl-bot-staging/Dataplex/v1/samples/V1/CatalogServiceClient/update_entry_group.php deleted file mode 100644 index 67f075f75ecc..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/CatalogServiceClient/update_entry_group.php +++ /dev/null @@ -1,74 +0,0 @@ -setEntryGroup($entryGroup) - ->setUpdateMask($updateMask); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $catalogServiceClient->updateEntryGroup($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var EntryGroup $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END dataplex_v1_generated_CatalogService_UpdateEntryGroup_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/CatalogServiceClient/update_entry_type.php b/owl-bot-staging/Dataplex/v1/samples/V1/CatalogServiceClient/update_entry_type.php deleted file mode 100644 index 571c132ab71d..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/CatalogServiceClient/update_entry_type.php +++ /dev/null @@ -1,74 +0,0 @@ -setEntryType($entryType) - ->setUpdateMask($updateMask); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $catalogServiceClient->updateEntryType($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var EntryType $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END dataplex_v1_generated_CatalogService_UpdateEntryType_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/create_content.php b/owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/create_content.php deleted file mode 100644 index 0d3d0a33b10d..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/create_content.php +++ /dev/null @@ -1,85 +0,0 @@ -setPath($contentPath) - ->setDataText($contentDataText); - $request = (new CreateContentRequest()) - ->setParent($formattedParent) - ->setContent($content); - - // Call the API and handle any network failures. - try { - /** @var Content $response */ - $response = $contentServiceClient->createContent($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = ContentServiceClient::lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - $contentPath = '[PATH]'; - $contentDataText = '[DATA_TEXT]'; - - create_content_sample($formattedParent, $contentPath, $contentDataText); -} -// [END dataplex_v1_generated_ContentService_CreateContent_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/delete_content.php b/owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/delete_content.php deleted file mode 100644 index 84bc11301872..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/delete_content.php +++ /dev/null @@ -1,75 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $contentServiceClient->deleteContent($request); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = ContentServiceClient::contentName( - '[PROJECT]', - '[LOCATION]', - '[LAKE]', - '[CONTENT]' - ); - - delete_content_sample($formattedName); -} -// [END dataplex_v1_generated_ContentService_DeleteContent_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/get_content.php b/owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/get_content.php deleted file mode 100644 index f3fefc8876b1..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/get_content.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Content $response */ - $response = $contentServiceClient->getContent($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = ContentServiceClient::contentName( - '[PROJECT]', - '[LOCATION]', - '[LAKE]', - '[CONTENT]' - ); - - get_content_sample($formattedName); -} -// [END dataplex_v1_generated_ContentService_GetContent_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/get_iam_policy.php b/owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/get_iam_policy.php deleted file mode 100644 index 1f114539fc4a..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/get_iam_policy.php +++ /dev/null @@ -1,76 +0,0 @@ -setResource($resource); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $contentServiceClient->getIamPolicy($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - get_iam_policy_sample($resource); -} -// [END dataplex_v1_generated_ContentService_GetIamPolicy_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/get_location.php b/owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/get_location.php deleted file mode 100644 index 6c27fc7554bd..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/get_location.php +++ /dev/null @@ -1,57 +0,0 @@ -getLocation($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END dataplex_v1_generated_ContentService_GetLocation_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/list_content.php b/owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/list_content.php deleted file mode 100644 index 869948f00feb..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/list_content.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $contentServiceClient->listContent($request); - - /** @var Content $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = ContentServiceClient::lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - - list_content_sample($formattedParent); -} -// [END dataplex_v1_generated_ContentService_ListContent_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/list_locations.php b/owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/list_locations.php deleted file mode 100644 index 81cc913d8732..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/list_locations.php +++ /dev/null @@ -1,62 +0,0 @@ -listLocations($request); - - /** @var Location $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END dataplex_v1_generated_ContentService_ListLocations_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/set_iam_policy.php b/owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/set_iam_policy.php deleted file mode 100644 index b13fd7300702..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/set_iam_policy.php +++ /dev/null @@ -1,77 +0,0 @@ -setResource($resource) - ->setPolicy($policy); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $contentServiceClient->setIamPolicy($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - set_iam_policy_sample($resource); -} -// [END dataplex_v1_generated_ContentService_SetIamPolicy_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/test_iam_permissions.php b/owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/test_iam_permissions.php deleted file mode 100644 index 0df29f52bc9e..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/test_iam_permissions.php +++ /dev/null @@ -1,87 +0,0 @@ -setResource($resource) - ->setPermissions($permissions); - - // Call the API and handle any network failures. - try { - /** @var TestIamPermissionsResponse $response */ - $response = $contentServiceClient->testIamPermissions($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - $permissionsElement = '[PERMISSIONS]'; - - test_iam_permissions_sample($resource, $permissionsElement); -} -// [END dataplex_v1_generated_ContentService_TestIamPermissions_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/update_content.php b/owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/update_content.php deleted file mode 100644 index 99915fd652d0..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/ContentServiceClient/update_content.php +++ /dev/null @@ -1,80 +0,0 @@ -setPath($contentPath) - ->setDataText($contentDataText); - $request = (new UpdateContentRequest()) - ->setUpdateMask($updateMask) - ->setContent($content); - - // Call the API and handle any network failures. - try { - /** @var Content $response */ - $response = $contentServiceClient->updateContent($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $contentPath = '[PATH]'; - $contentDataText = '[DATA_TEXT]'; - - update_content_sample($contentPath, $contentDataText); -} -// [END dataplex_v1_generated_ContentService_UpdateContent_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/create_data_scan.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/create_data_scan.php deleted file mode 100644 index e898ddd9e30e..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/create_data_scan.php +++ /dev/null @@ -1,100 +0,0 @@ -setData($dataScanData); - $request = (new CreateDataScanRequest()) - ->setParent($formattedParent) - ->setDataScan($dataScan) - ->setDataScanId($dataScanId); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $dataScanServiceClient->createDataScan($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var DataScan $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = DataScanServiceClient::locationName('[PROJECT]', '[LOCATION]'); - $dataScanId = '[DATA_SCAN_ID]'; - - create_data_scan_sample($formattedParent, $dataScanId); -} -// [END dataplex_v1_generated_DataScanService_CreateDataScan_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/delete_data_scan.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/delete_data_scan.php deleted file mode 100644 index c93dbcf525e5..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/delete_data_scan.php +++ /dev/null @@ -1,83 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $dataScanServiceClient->deleteDataScan($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = DataScanServiceClient::dataScanName('[PROJECT]', '[LOCATION]', '[DATASCAN]'); - - delete_data_scan_sample($formattedName); -} -// [END dataplex_v1_generated_DataScanService_DeleteDataScan_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/generate_data_quality_rules.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/generate_data_quality_rules.php deleted file mode 100644 index e522ad830756..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/generate_data_quality_rules.php +++ /dev/null @@ -1,73 +0,0 @@ -setName($name); - - // Call the API and handle any network failures. - try { - /** @var GenerateDataQualityRulesResponse $response */ - $response = $dataScanServiceClient->generateDataQualityRules($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $name = '[NAME]'; - - generate_data_quality_rules_sample($name); -} -// [END dataplex_v1_generated_DataScanService_GenerateDataQualityRules_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/get_data_scan.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/get_data_scan.php deleted file mode 100644 index ac55704f892f..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/get_data_scan.php +++ /dev/null @@ -1,74 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var DataScan $response */ - $response = $dataScanServiceClient->getDataScan($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = DataScanServiceClient::dataScanName('[PROJECT]', '[LOCATION]', '[DATASCAN]'); - - get_data_scan_sample($formattedName); -} -// [END dataplex_v1_generated_DataScanService_GetDataScan_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/get_data_scan_job.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/get_data_scan_job.php deleted file mode 100644 index f0677012b3b3..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/get_data_scan_job.php +++ /dev/null @@ -1,79 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var DataScanJob $response */ - $response = $dataScanServiceClient->getDataScanJob($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = DataScanServiceClient::dataScanJobName( - '[PROJECT]', - '[LOCATION]', - '[DATASCAN]', - '[JOB]' - ); - - get_data_scan_job_sample($formattedName); -} -// [END dataplex_v1_generated_DataScanService_GetDataScanJob_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/get_iam_policy.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/get_iam_policy.php deleted file mode 100644 index cb5aaf53ec2a..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/get_iam_policy.php +++ /dev/null @@ -1,72 +0,0 @@ -setResource($resource); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $dataScanServiceClient->getIamPolicy($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - get_iam_policy_sample($resource); -} -// [END dataplex_v1_generated_DataScanService_GetIamPolicy_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/get_location.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/get_location.php deleted file mode 100644 index 49a44a4e3ebd..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/get_location.php +++ /dev/null @@ -1,57 +0,0 @@ -getLocation($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END dataplex_v1_generated_DataScanService_GetLocation_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/list_data_scan_jobs.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/list_data_scan_jobs.php deleted file mode 100644 index f03bfc863dc7..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/list_data_scan_jobs.php +++ /dev/null @@ -1,79 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $dataScanServiceClient->listDataScanJobs($request); - - /** @var DataScanJob $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = DataScanServiceClient::dataScanName('[PROJECT]', '[LOCATION]', '[DATASCAN]'); - - list_data_scan_jobs_sample($formattedParent); -} -// [END dataplex_v1_generated_DataScanService_ListDataScanJobs_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/list_data_scans.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/list_data_scans.php deleted file mode 100644 index 5a13a48cc8ac..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/list_data_scans.php +++ /dev/null @@ -1,79 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $dataScanServiceClient->listDataScans($request); - - /** @var DataScan $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = DataScanServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - list_data_scans_sample($formattedParent); -} -// [END dataplex_v1_generated_DataScanService_ListDataScans_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/list_locations.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/list_locations.php deleted file mode 100644 index 74bb86bf8bd2..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/list_locations.php +++ /dev/null @@ -1,62 +0,0 @@ -listLocations($request); - - /** @var Location $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END dataplex_v1_generated_DataScanService_ListLocations_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/run_data_scan.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/run_data_scan.php deleted file mode 100644 index 0fe575e350b6..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/run_data_scan.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var RunDataScanResponse $response */ - $response = $dataScanServiceClient->runDataScan($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = DataScanServiceClient::dataScanName('[PROJECT]', '[LOCATION]', '[DATASCAN]'); - - run_data_scan_sample($formattedName); -} -// [END dataplex_v1_generated_DataScanService_RunDataScan_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/set_iam_policy.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/set_iam_policy.php deleted file mode 100644 index 44ce6e07f4f6..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/set_iam_policy.php +++ /dev/null @@ -1,77 +0,0 @@ -setResource($resource) - ->setPolicy($policy); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $dataScanServiceClient->setIamPolicy($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - set_iam_policy_sample($resource); -} -// [END dataplex_v1_generated_DataScanService_SetIamPolicy_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/test_iam_permissions.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/test_iam_permissions.php deleted file mode 100644 index 510cb349e8e7..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/test_iam_permissions.php +++ /dev/null @@ -1,84 +0,0 @@ -setResource($resource) - ->setPermissions($permissions); - - // Call the API and handle any network failures. - try { - /** @var TestIamPermissionsResponse $response */ - $response = $dataScanServiceClient->testIamPermissions($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - $permissionsElement = '[PERMISSIONS]'; - - test_iam_permissions_sample($resource, $permissionsElement); -} -// [END dataplex_v1_generated_DataScanService_TestIamPermissions_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/update_data_scan.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/update_data_scan.php deleted file mode 100644 index 30a1d182d299..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataScanServiceClient/update_data_scan.php +++ /dev/null @@ -1,77 +0,0 @@ -setData($dataScanData); - $updateMask = new FieldMask(); - $request = (new UpdateDataScanRequest()) - ->setDataScan($dataScan) - ->setUpdateMask($updateMask); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $dataScanServiceClient->updateDataScan($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var DataScan $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END dataplex_v1_generated_DataScanService_UpdateDataScan_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/create_data_attribute.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/create_data_attribute.php deleted file mode 100644 index 37cd05a7aad3..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/create_data_attribute.php +++ /dev/null @@ -1,98 +0,0 @@ -setParent($formattedParent) - ->setDataAttributeId($dataAttributeId) - ->setDataAttribute($dataAttribute); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $dataTaxonomyServiceClient->createDataAttribute($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var DataAttribute $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = DataTaxonomyServiceClient::dataTaxonomyName( - '[PROJECT]', - '[LOCATION]', - '[DATA_TAXONOMY_ID]' - ); - $dataAttributeId = '[DATA_ATTRIBUTE_ID]'; - - create_data_attribute_sample($formattedParent, $dataAttributeId); -} -// [END dataplex_v1_generated_DataTaxonomyService_CreateDataAttribute_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/create_data_attribute_binding.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/create_data_attribute_binding.php deleted file mode 100644 index dbf68d8273cc..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/create_data_attribute_binding.php +++ /dev/null @@ -1,96 +0,0 @@ -setParent($formattedParent) - ->setDataAttributeBindingId($dataAttributeBindingId) - ->setDataAttributeBinding($dataAttributeBinding); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $dataTaxonomyServiceClient->createDataAttributeBinding($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var DataAttributeBinding $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = DataTaxonomyServiceClient::locationName('[PROJECT]', '[LOCATION]'); - $dataAttributeBindingId = '[DATA_ATTRIBUTE_BINDING_ID]'; - - create_data_attribute_binding_sample($formattedParent, $dataAttributeBindingId); -} -// [END dataplex_v1_generated_DataTaxonomyService_CreateDataAttributeBinding_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/create_data_taxonomy.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/create_data_taxonomy.php deleted file mode 100644 index b39c503b4314..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/create_data_taxonomy.php +++ /dev/null @@ -1,95 +0,0 @@ -setParent($formattedParent) - ->setDataTaxonomyId($dataTaxonomyId) - ->setDataTaxonomy($dataTaxonomy); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $dataTaxonomyServiceClient->createDataTaxonomy($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var DataTaxonomy $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = DataTaxonomyServiceClient::locationName('[PROJECT]', '[LOCATION]'); - $dataTaxonomyId = '[DATA_TAXONOMY_ID]'; - - create_data_taxonomy_sample($formattedParent, $dataTaxonomyId); -} -// [END dataplex_v1_generated_DataTaxonomyService_CreateDataTaxonomy_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/delete_data_attribute.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/delete_data_attribute.php deleted file mode 100644 index 41bc480492ec..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/delete_data_attribute.php +++ /dev/null @@ -1,86 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $dataTaxonomyServiceClient->deleteDataAttribute($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = DataTaxonomyServiceClient::dataAttributeName( - '[PROJECT]', - '[LOCATION]', - '[DATATAXONOMY]', - '[DATA_ATTRIBUTE_ID]' - ); - - delete_data_attribute_sample($formattedName); -} -// [END dataplex_v1_generated_DataTaxonomyService_DeleteDataAttribute_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/delete_data_attribute_binding.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/delete_data_attribute_binding.php deleted file mode 100644 index e529f2587ee6..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/delete_data_attribute_binding.php +++ /dev/null @@ -1,93 +0,0 @@ -setName($formattedName) - ->setEtag($etag); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $dataTaxonomyServiceClient->deleteDataAttributeBinding($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = DataTaxonomyServiceClient::dataAttributeBindingName( - '[PROJECT]', - '[LOCATION]', - '[DATA_ATTRIBUTE_BINDING_ID]' - ); - $etag = '[ETAG]'; - - delete_data_attribute_binding_sample($formattedName, $etag); -} -// [END dataplex_v1_generated_DataTaxonomyService_DeleteDataAttributeBinding_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/delete_data_taxonomy.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/delete_data_taxonomy.php deleted file mode 100644 index fec6cc32b6b2..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/delete_data_taxonomy.php +++ /dev/null @@ -1,86 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $dataTaxonomyServiceClient->deleteDataTaxonomy($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = DataTaxonomyServiceClient::dataTaxonomyName( - '[PROJECT]', - '[LOCATION]', - '[DATA_TAXONOMY_ID]' - ); - - delete_data_taxonomy_sample($formattedName); -} -// [END dataplex_v1_generated_DataTaxonomyService_DeleteDataTaxonomy_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/get_data_attribute.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/get_data_attribute.php deleted file mode 100644 index 7ff73e847040..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/get_data_attribute.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var DataAttribute $response */ - $response = $dataTaxonomyServiceClient->getDataAttribute($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = DataTaxonomyServiceClient::dataAttributeName( - '[PROJECT]', - '[LOCATION]', - '[DATATAXONOMY]', - '[DATA_ATTRIBUTE_ID]' - ); - - get_data_attribute_sample($formattedName); -} -// [END dataplex_v1_generated_DataTaxonomyService_GetDataAttribute_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/get_data_attribute_binding.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/get_data_attribute_binding.php deleted file mode 100644 index f93631be6dc0..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/get_data_attribute_binding.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var DataAttributeBinding $response */ - $response = $dataTaxonomyServiceClient->getDataAttributeBinding($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = DataTaxonomyServiceClient::dataAttributeBindingName( - '[PROJECT]', - '[LOCATION]', - '[DATA_ATTRIBUTE_BINDING_ID]' - ); - - get_data_attribute_binding_sample($formattedName); -} -// [END dataplex_v1_generated_DataTaxonomyService_GetDataAttributeBinding_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/get_data_taxonomy.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/get_data_taxonomy.php deleted file mode 100644 index cac79a746b4c..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/get_data_taxonomy.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var DataTaxonomy $response */ - $response = $dataTaxonomyServiceClient->getDataTaxonomy($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = DataTaxonomyServiceClient::dataTaxonomyName( - '[PROJECT]', - '[LOCATION]', - '[DATA_TAXONOMY_ID]' - ); - - get_data_taxonomy_sample($formattedName); -} -// [END dataplex_v1_generated_DataTaxonomyService_GetDataTaxonomy_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/get_iam_policy.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/get_iam_policy.php deleted file mode 100644 index 4b81e4a3cfd7..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/get_iam_policy.php +++ /dev/null @@ -1,72 +0,0 @@ -setResource($resource); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $dataTaxonomyServiceClient->getIamPolicy($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - get_iam_policy_sample($resource); -} -// [END dataplex_v1_generated_DataTaxonomyService_GetIamPolicy_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/get_location.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/get_location.php deleted file mode 100644 index 614ff77bf3ed..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/get_location.php +++ /dev/null @@ -1,57 +0,0 @@ -getLocation($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END dataplex_v1_generated_DataTaxonomyService_GetLocation_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/list_data_attribute_bindings.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/list_data_attribute_bindings.php deleted file mode 100644 index fb77a57d4ee1..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/list_data_attribute_bindings.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $dataTaxonomyServiceClient->listDataAttributeBindings($request); - - /** @var DataAttributeBinding $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = DataTaxonomyServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - list_data_attribute_bindings_sample($formattedParent); -} -// [END dataplex_v1_generated_DataTaxonomyService_ListDataAttributeBindings_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/list_data_attributes.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/list_data_attributes.php deleted file mode 100644 index 0edfdd04ebc0..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/list_data_attributes.php +++ /dev/null @@ -1,81 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $dataTaxonomyServiceClient->listDataAttributes($request); - - /** @var DataAttribute $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = DataTaxonomyServiceClient::dataTaxonomyName( - '[PROJECT]', - '[LOCATION]', - '[DATA_TAXONOMY_ID]' - ); - - list_data_attributes_sample($formattedParent); -} -// [END dataplex_v1_generated_DataTaxonomyService_ListDataAttributes_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/list_data_taxonomies.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/list_data_taxonomies.php deleted file mode 100644 index 227e305ace6a..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/list_data_taxonomies.php +++ /dev/null @@ -1,78 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $dataTaxonomyServiceClient->listDataTaxonomies($request); - - /** @var DataTaxonomy $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = DataTaxonomyServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - list_data_taxonomies_sample($formattedParent); -} -// [END dataplex_v1_generated_DataTaxonomyService_ListDataTaxonomies_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/list_locations.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/list_locations.php deleted file mode 100644 index aa7f8669a268..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/list_locations.php +++ /dev/null @@ -1,62 +0,0 @@ -listLocations($request); - - /** @var Location $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END dataplex_v1_generated_DataTaxonomyService_ListLocations_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/set_iam_policy.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/set_iam_policy.php deleted file mode 100644 index d9b425bf1109..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/set_iam_policy.php +++ /dev/null @@ -1,77 +0,0 @@ -setResource($resource) - ->setPolicy($policy); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $dataTaxonomyServiceClient->setIamPolicy($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - set_iam_policy_sample($resource); -} -// [END dataplex_v1_generated_DataTaxonomyService_SetIamPolicy_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/test_iam_permissions.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/test_iam_permissions.php deleted file mode 100644 index 13a7ccdd6c13..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/test_iam_permissions.php +++ /dev/null @@ -1,84 +0,0 @@ -setResource($resource) - ->setPermissions($permissions); - - // Call the API and handle any network failures. - try { - /** @var TestIamPermissionsResponse $response */ - $response = $dataTaxonomyServiceClient->testIamPermissions($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - $permissionsElement = '[PERMISSIONS]'; - - test_iam_permissions_sample($resource, $permissionsElement); -} -// [END dataplex_v1_generated_DataTaxonomyService_TestIamPermissions_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/update_data_attribute.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/update_data_attribute.php deleted file mode 100644 index 8767da6814b2..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/update_data_attribute.php +++ /dev/null @@ -1,74 +0,0 @@ -setUpdateMask($updateMask) - ->setDataAttribute($dataAttribute); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $dataTaxonomyServiceClient->updateDataAttribute($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var DataAttribute $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END dataplex_v1_generated_DataTaxonomyService_UpdateDataAttribute_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/update_data_attribute_binding.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/update_data_attribute_binding.php deleted file mode 100644 index 5edbff0f9783..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/update_data_attribute_binding.php +++ /dev/null @@ -1,74 +0,0 @@ -setUpdateMask($updateMask) - ->setDataAttributeBinding($dataAttributeBinding); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $dataTaxonomyServiceClient->updateDataAttributeBinding($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var DataAttributeBinding $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END dataplex_v1_generated_DataTaxonomyService_UpdateDataAttributeBinding_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/update_data_taxonomy.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/update_data_taxonomy.php deleted file mode 100644 index 7f1d64fe24ac..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataTaxonomyServiceClient/update_data_taxonomy.php +++ /dev/null @@ -1,74 +0,0 @@ -setUpdateMask($updateMask) - ->setDataTaxonomy($dataTaxonomy); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $dataTaxonomyServiceClient->updateDataTaxonomy($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var DataTaxonomy $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END dataplex_v1_generated_DataTaxonomyService_UpdateDataTaxonomy_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/cancel_job.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/cancel_job.php deleted file mode 100644 index fd781b8b1169..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/cancel_job.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $dataplexServiceClient->cancelJob($request); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = DataplexServiceClient::jobName( - '[PROJECT]', - '[LOCATION]', - '[LAKE]', - '[TASK]', - '[JOB]' - ); - - cancel_job_sample($formattedName); -} -// [END dataplex_v1_generated_DataplexService_CancelJob_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/create_asset.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/create_asset.php deleted file mode 100644 index 6daf7238af75..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/create_asset.php +++ /dev/null @@ -1,106 +0,0 @@ -setType($assetResourceSpecType); - $asset = (new Asset()) - ->setResourceSpec($assetResourceSpec); - $request = (new CreateAssetRequest()) - ->setParent($formattedParent) - ->setAssetId($assetId) - ->setAsset($asset); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $dataplexServiceClient->createAsset($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Asset $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = DataplexServiceClient::zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); - $assetId = '[ASSET_ID]'; - $assetResourceSpecType = Type::TYPE_UNSPECIFIED; - - create_asset_sample($formattedParent, $assetId, $assetResourceSpecType); -} -// [END dataplex_v1_generated_DataplexService_CreateAsset_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/create_environment.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/create_environment.php deleted file mode 100644 index bec60d3e935b..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/create_environment.php +++ /dev/null @@ -1,110 +0,0 @@ -setImageVersion($environmentInfrastructureSpecOsImageImageVersion); - $environmentInfrastructureSpec = (new InfrastructureSpec()) - ->setOsImage($environmentInfrastructureSpecOsImage); - $environment = (new Environment()) - ->setInfrastructureSpec($environmentInfrastructureSpec); - $request = (new CreateEnvironmentRequest()) - ->setParent($formattedParent) - ->setEnvironmentId($environmentId) - ->setEnvironment($environment); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $dataplexServiceClient->createEnvironment($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Environment $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = DataplexServiceClient::lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - $environmentId = '[ENVIRONMENT_ID]'; - $environmentInfrastructureSpecOsImageImageVersion = '[IMAGE_VERSION]'; - - create_environment_sample( - $formattedParent, - $environmentId, - $environmentInfrastructureSpecOsImageImageVersion - ); -} -// [END dataplex_v1_generated_DataplexService_CreateEnvironment_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/create_lake.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/create_lake.php deleted file mode 100644 index 8942e867d2e9..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/create_lake.php +++ /dev/null @@ -1,97 +0,0 @@ -setParent($formattedParent) - ->setLakeId($lakeId) - ->setLake($lake); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $dataplexServiceClient->createLake($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Lake $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = DataplexServiceClient::locationName('[PROJECT]', '[LOCATION]'); - $lakeId = '[LAKE_ID]'; - - create_lake_sample($formattedParent, $lakeId); -} -// [END dataplex_v1_generated_DataplexService_CreateLake_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/create_task.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/create_task.php deleted file mode 100644 index 66b117d41740..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/create_task.php +++ /dev/null @@ -1,113 +0,0 @@ -setType($taskTriggerSpecType); - $taskExecutionSpec = (new ExecutionSpec()) - ->setServiceAccount($taskExecutionSpecServiceAccount); - $task = (new Task()) - ->setTriggerSpec($taskTriggerSpec) - ->setExecutionSpec($taskExecutionSpec); - $request = (new CreateTaskRequest()) - ->setParent($formattedParent) - ->setTaskId($taskId) - ->setTask($task); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $dataplexServiceClient->createTask($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Task $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = DataplexServiceClient::lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - $taskId = '[TASK_ID]'; - $taskTriggerSpecType = Type::TYPE_UNSPECIFIED; - $taskExecutionSpecServiceAccount = '[SERVICE_ACCOUNT]'; - - create_task_sample( - $formattedParent, - $taskId, - $taskTriggerSpecType, - $taskExecutionSpecServiceAccount - ); -} -// [END dataplex_v1_generated_DataplexService_CreateTask_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/create_zone.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/create_zone.php deleted file mode 100644 index bfb0af2aacdd..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/create_zone.php +++ /dev/null @@ -1,113 +0,0 @@ -setLocationType($zoneResourceSpecLocationType); - $zone = (new Zone()) - ->setType($zoneType) - ->setResourceSpec($zoneResourceSpec); - $request = (new CreateZoneRequest()) - ->setParent($formattedParent) - ->setZoneId($zoneId) - ->setZone($zone); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $dataplexServiceClient->createZone($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Zone $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = DataplexServiceClient::lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - $zoneId = '[ZONE_ID]'; - $zoneType = Type::TYPE_UNSPECIFIED; - $zoneResourceSpecLocationType = LocationType::LOCATION_TYPE_UNSPECIFIED; - - create_zone_sample($formattedParent, $zoneId, $zoneType, $zoneResourceSpecLocationType); -} -// [END dataplex_v1_generated_DataplexService_CreateZone_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/delete_asset.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/delete_asset.php deleted file mode 100644 index dc365eafbf34..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/delete_asset.php +++ /dev/null @@ -1,88 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $dataplexServiceClient->deleteAsset($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = DataplexServiceClient::assetName( - '[PROJECT]', - '[LOCATION]', - '[LAKE]', - '[ZONE]', - '[ASSET]' - ); - - delete_asset_sample($formattedName); -} -// [END dataplex_v1_generated_DataplexService_DeleteAsset_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/delete_environment.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/delete_environment.php deleted file mode 100644 index 6de43b138230..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/delete_environment.php +++ /dev/null @@ -1,87 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $dataplexServiceClient->deleteEnvironment($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = DataplexServiceClient::environmentName( - '[PROJECT]', - '[LOCATION]', - '[LAKE]', - '[ENVIRONMENT]' - ); - - delete_environment_sample($formattedName); -} -// [END dataplex_v1_generated_DataplexService_DeleteEnvironment_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/delete_lake.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/delete_lake.php deleted file mode 100644 index b44ff9ec7168..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/delete_lake.php +++ /dev/null @@ -1,82 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $dataplexServiceClient->deleteLake($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = DataplexServiceClient::lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - - delete_lake_sample($formattedName); -} -// [END dataplex_v1_generated_DataplexService_DeleteLake_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/delete_task.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/delete_task.php deleted file mode 100644 index ab102fdc7a76..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/delete_task.php +++ /dev/null @@ -1,81 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $dataplexServiceClient->deleteTask($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = DataplexServiceClient::taskName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]'); - - delete_task_sample($formattedName); -} -// [END dataplex_v1_generated_DataplexService_DeleteTask_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/delete_zone.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/delete_zone.php deleted file mode 100644 index 9174a7c3019b..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/delete_zone.php +++ /dev/null @@ -1,82 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $dataplexServiceClient->deleteZone($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = DataplexServiceClient::zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); - - delete_zone_sample($formattedName); -} -// [END dataplex_v1_generated_DataplexService_DeleteZone_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/get_asset.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/get_asset.php deleted file mode 100644 index 0d5476c0bff3..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/get_asset.php +++ /dev/null @@ -1,78 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Asset $response */ - $response = $dataplexServiceClient->getAsset($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = DataplexServiceClient::assetName( - '[PROJECT]', - '[LOCATION]', - '[LAKE]', - '[ZONE]', - '[ASSET]' - ); - - get_asset_sample($formattedName); -} -// [END dataplex_v1_generated_DataplexService_GetAsset_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/get_environment.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/get_environment.php deleted file mode 100644 index d4d6d48572c4..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/get_environment.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Environment $response */ - $response = $dataplexServiceClient->getEnvironment($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = DataplexServiceClient::environmentName( - '[PROJECT]', - '[LOCATION]', - '[LAKE]', - '[ENVIRONMENT]' - ); - - get_environment_sample($formattedName); -} -// [END dataplex_v1_generated_DataplexService_GetEnvironment_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/get_iam_policy.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/get_iam_policy.php deleted file mode 100644 index bee4a8fe0872..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/get_iam_policy.php +++ /dev/null @@ -1,72 +0,0 @@ -setResource($resource); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $dataplexServiceClient->getIamPolicy($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - get_iam_policy_sample($resource); -} -// [END dataplex_v1_generated_DataplexService_GetIamPolicy_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/get_job.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/get_job.php deleted file mode 100644 index 04bb9ff50a02..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/get_job.php +++ /dev/null @@ -1,78 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Job $response */ - $response = $dataplexServiceClient->getJob($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = DataplexServiceClient::jobName( - '[PROJECT]', - '[LOCATION]', - '[LAKE]', - '[TASK]', - '[JOB]' - ); - - get_job_sample($formattedName); -} -// [END dataplex_v1_generated_DataplexService_GetJob_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/get_lake.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/get_lake.php deleted file mode 100644 index 89effb0d9976..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/get_lake.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Lake $response */ - $response = $dataplexServiceClient->getLake($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = DataplexServiceClient::lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - - get_lake_sample($formattedName); -} -// [END dataplex_v1_generated_DataplexService_GetLake_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/get_location.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/get_location.php deleted file mode 100644 index ee4dd1714c6b..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/get_location.php +++ /dev/null @@ -1,57 +0,0 @@ -getLocation($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END dataplex_v1_generated_DataplexService_GetLocation_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/get_task.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/get_task.php deleted file mode 100644 index 3d56a1279344..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/get_task.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Task $response */ - $response = $dataplexServiceClient->getTask($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = DataplexServiceClient::taskName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]'); - - get_task_sample($formattedName); -} -// [END dataplex_v1_generated_DataplexService_GetTask_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/get_zone.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/get_zone.php deleted file mode 100644 index b204655c0ded..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/get_zone.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Zone $response */ - $response = $dataplexServiceClient->getZone($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = DataplexServiceClient::zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); - - get_zone_sample($formattedName); -} -// [END dataplex_v1_generated_DataplexService_GetZone_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_asset_actions.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_asset_actions.php deleted file mode 100644 index cdd9ba4df9b6..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_asset_actions.php +++ /dev/null @@ -1,83 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $dataplexServiceClient->listAssetActions($request); - - /** @var Action $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = DataplexServiceClient::assetName( - '[PROJECT]', - '[LOCATION]', - '[LAKE]', - '[ZONE]', - '[ASSET]' - ); - - list_asset_actions_sample($formattedParent); -} -// [END dataplex_v1_generated_DataplexService_ListAssetActions_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_assets.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_assets.php deleted file mode 100644 index 58697407c341..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_assets.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $dataplexServiceClient->listAssets($request); - - /** @var Asset $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = DataplexServiceClient::zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); - - list_assets_sample($formattedParent); -} -// [END dataplex_v1_generated_DataplexService_ListAssets_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_environments.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_environments.php deleted file mode 100644 index 3b86984afa46..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_environments.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $dataplexServiceClient->listEnvironments($request); - - /** @var Environment $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = DataplexServiceClient::lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - - list_environments_sample($formattedParent); -} -// [END dataplex_v1_generated_DataplexService_ListEnvironments_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_jobs.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_jobs.php deleted file mode 100644 index 348bcd193e9f..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_jobs.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $dataplexServiceClient->listJobs($request); - - /** @var Job $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = DataplexServiceClient::taskName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]'); - - list_jobs_sample($formattedParent); -} -// [END dataplex_v1_generated_DataplexService_ListJobs_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_lake_actions.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_lake_actions.php deleted file mode 100644 index 2169b2ed28c5..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_lake_actions.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $dataplexServiceClient->listLakeActions($request); - - /** @var Action $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = DataplexServiceClient::lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - - list_lake_actions_sample($formattedParent); -} -// [END dataplex_v1_generated_DataplexService_ListLakeActions_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_lakes.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_lakes.php deleted file mode 100644 index 6fb1f89f8a0b..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_lakes.php +++ /dev/null @@ -1,78 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $dataplexServiceClient->listLakes($request); - - /** @var Lake $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = DataplexServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - list_lakes_sample($formattedParent); -} -// [END dataplex_v1_generated_DataplexService_ListLakes_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_locations.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_locations.php deleted file mode 100644 index c020bb31dddc..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_locations.php +++ /dev/null @@ -1,62 +0,0 @@ -listLocations($request); - - /** @var Location $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END dataplex_v1_generated_DataplexService_ListLocations_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_sessions.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_sessions.php deleted file mode 100644 index 98024eb951b0..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_sessions.php +++ /dev/null @@ -1,82 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $dataplexServiceClient->listSessions($request); - - /** @var Session $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = DataplexServiceClient::environmentName( - '[PROJECT]', - '[LOCATION]', - '[LAKE]', - '[ENVIRONMENT]' - ); - - list_sessions_sample($formattedParent); -} -// [END dataplex_v1_generated_DataplexService_ListSessions_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_tasks.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_tasks.php deleted file mode 100644 index a8714a9c49bb..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_tasks.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $dataplexServiceClient->listTasks($request); - - /** @var Task $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = DataplexServiceClient::lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - - list_tasks_sample($formattedParent); -} -// [END dataplex_v1_generated_DataplexService_ListTasks_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_zone_actions.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_zone_actions.php deleted file mode 100644 index 1750bc88e84b..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_zone_actions.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $dataplexServiceClient->listZoneActions($request); - - /** @var Action $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = DataplexServiceClient::zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); - - list_zone_actions_sample($formattedParent); -} -// [END dataplex_v1_generated_DataplexService_ListZoneActions_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_zones.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_zones.php deleted file mode 100644 index 452cfe85aa83..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/list_zones.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $dataplexServiceClient->listZones($request); - - /** @var Zone $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = DataplexServiceClient::lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - - list_zones_sample($formattedParent); -} -// [END dataplex_v1_generated_DataplexService_ListZones_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/run_task.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/run_task.php deleted file mode 100644 index a503380f30c7..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/run_task.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var RunTaskResponse $response */ - $response = $dataplexServiceClient->runTask($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = DataplexServiceClient::taskName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]'); - - run_task_sample($formattedName); -} -// [END dataplex_v1_generated_DataplexService_RunTask_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/set_iam_policy.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/set_iam_policy.php deleted file mode 100644 index c959b33278b2..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/set_iam_policy.php +++ /dev/null @@ -1,77 +0,0 @@ -setResource($resource) - ->setPolicy($policy); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $dataplexServiceClient->setIamPolicy($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - set_iam_policy_sample($resource); -} -// [END dataplex_v1_generated_DataplexService_SetIamPolicy_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/test_iam_permissions.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/test_iam_permissions.php deleted file mode 100644 index ebd0638cb54c..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/test_iam_permissions.php +++ /dev/null @@ -1,84 +0,0 @@ -setResource($resource) - ->setPermissions($permissions); - - // Call the API and handle any network failures. - try { - /** @var TestIamPermissionsResponse $response */ - $response = $dataplexServiceClient->testIamPermissions($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - $permissionsElement = '[PERMISSIONS]'; - - test_iam_permissions_sample($resource, $permissionsElement); -} -// [END dataplex_v1_generated_DataplexService_TestIamPermissions_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/update_asset.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/update_asset.php deleted file mode 100644 index cdf3d10feb87..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/update_asset.php +++ /dev/null @@ -1,91 +0,0 @@ -setType($assetResourceSpecType); - $asset = (new Asset()) - ->setResourceSpec($assetResourceSpec); - $request = (new UpdateAssetRequest()) - ->setUpdateMask($updateMask) - ->setAsset($asset); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $dataplexServiceClient->updateAsset($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Asset $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $assetResourceSpecType = Type::TYPE_UNSPECIFIED; - - update_asset_sample($assetResourceSpecType); -} -// [END dataplex_v1_generated_DataplexService_UpdateAsset_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/update_environment.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/update_environment.php deleted file mode 100644 index 834836d458f2..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/update_environment.php +++ /dev/null @@ -1,93 +0,0 @@ -setImageVersion($environmentInfrastructureSpecOsImageImageVersion); - $environmentInfrastructureSpec = (new InfrastructureSpec()) - ->setOsImage($environmentInfrastructureSpecOsImage); - $environment = (new Environment()) - ->setInfrastructureSpec($environmentInfrastructureSpec); - $request = (new UpdateEnvironmentRequest()) - ->setUpdateMask($updateMask) - ->setEnvironment($environment); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $dataplexServiceClient->updateEnvironment($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Environment $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $environmentInfrastructureSpecOsImageImageVersion = '[IMAGE_VERSION]'; - - update_environment_sample($environmentInfrastructureSpecOsImageImageVersion); -} -// [END dataplex_v1_generated_DataplexService_UpdateEnvironment_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/update_lake.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/update_lake.php deleted file mode 100644 index cb66f48e4d73..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/update_lake.php +++ /dev/null @@ -1,74 +0,0 @@ -setUpdateMask($updateMask) - ->setLake($lake); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $dataplexServiceClient->updateLake($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Lake $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END dataplex_v1_generated_DataplexService_UpdateLake_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/update_task.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/update_task.php deleted file mode 100644 index 68c069d72db7..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/update_task.php +++ /dev/null @@ -1,101 +0,0 @@ -setType($taskTriggerSpecType); - $taskExecutionSpec = (new ExecutionSpec()) - ->setServiceAccount($taskExecutionSpecServiceAccount); - $task = (new Task()) - ->setTriggerSpec($taskTriggerSpec) - ->setExecutionSpec($taskExecutionSpec); - $request = (new UpdateTaskRequest()) - ->setUpdateMask($updateMask) - ->setTask($task); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $dataplexServiceClient->updateTask($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Task $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $taskTriggerSpecType = Type::TYPE_UNSPECIFIED; - $taskExecutionSpecServiceAccount = '[SERVICE_ACCOUNT]'; - - update_task_sample($taskTriggerSpecType, $taskExecutionSpecServiceAccount); -} -// [END dataplex_v1_generated_DataplexService_UpdateTask_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/update_zone.php b/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/update_zone.php deleted file mode 100644 index 7fa21db75955..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/DataplexServiceClient/update_zone.php +++ /dev/null @@ -1,96 +0,0 @@ -setLocationType($zoneResourceSpecLocationType); - $zone = (new Zone()) - ->setType($zoneType) - ->setResourceSpec($zoneResourceSpec); - $request = (new UpdateZoneRequest()) - ->setUpdateMask($updateMask) - ->setZone($zone); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $dataplexServiceClient->updateZone($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Zone $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $zoneType = Type::TYPE_UNSPECIFIED; - $zoneResourceSpecLocationType = LocationType::LOCATION_TYPE_UNSPECIFIED; - - update_zone_sample($zoneType, $zoneResourceSpecLocationType); -} -// [END dataplex_v1_generated_DataplexService_UpdateZone_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/create_entity.php b/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/create_entity.php deleted file mode 100644 index fe62dc877170..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/create_entity.php +++ /dev/null @@ -1,158 +0,0 @@ - - * - image/{image subtype} - * - video/{video subtype} - * - audio/{audio subtype} - * @param bool $entitySchemaUserManaged Set to `true` if user-managed or `false` if managed by Dataplex. - * The default is `false` (managed by Dataplex). - * - * - Set to `false`to enable Dataplex discovery to update the schema. - * including new data discovery, schema inference, and schema evolution. - * Users retain the ability to input and edit the schema. Dataplex - * treats schema input by the user as though produced - * by a previous Dataplex discovery operation, and it will - * evolve the schema and take action based on that treatment. - * - * - Set to `true` to fully manage the entity - * schema. This setting guarantees that Dataplex will not - * change schema fields. - */ -function create_entity_sample( - string $formattedParent, - string $entityId, - int $entityType, - string $entityAsset, - string $entityDataPath, - int $entitySystem, - string $entityFormatMimeType, - bool $entitySchemaUserManaged -): void { - // Create a client. - $metadataServiceClient = new MetadataServiceClient(); - - // Prepare the request message. - $entityFormat = (new StorageFormat()) - ->setMimeType($entityFormatMimeType); - $entitySchema = (new Schema()) - ->setUserManaged($entitySchemaUserManaged); - $entity = (new Entity()) - ->setId($entityId) - ->setType($entityType) - ->setAsset($entityAsset) - ->setDataPath($entityDataPath) - ->setSystem($entitySystem) - ->setFormat($entityFormat) - ->setSchema($entitySchema); - $request = (new CreateEntityRequest()) - ->setParent($formattedParent) - ->setEntity($entity); - - // Call the API and handle any network failures. - try { - /** @var Entity $response */ - $response = $metadataServiceClient->createEntity($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = MetadataServiceClient::zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); - $entityId = '[ID]'; - $entityType = Type::TYPE_UNSPECIFIED; - $entityAsset = '[ASSET]'; - $entityDataPath = '[DATA_PATH]'; - $entitySystem = StorageSystem::STORAGE_SYSTEM_UNSPECIFIED; - $entityFormatMimeType = '[MIME_TYPE]'; - $entitySchemaUserManaged = false; - - create_entity_sample( - $formattedParent, - $entityId, - $entityType, - $entityAsset, - $entityDataPath, - $entitySystem, - $entityFormatMimeType, - $entitySchemaUserManaged - ); -} -// [END dataplex_v1_generated_MetadataService_CreateEntity_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/create_partition.php b/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/create_partition.php deleted file mode 100644 index afc2abc5e7b4..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/create_partition.php +++ /dev/null @@ -1,93 +0,0 @@ -/datasets//tables/` - */ -function create_partition_sample( - string $formattedParent, - string $partitionValuesElement, - string $partitionLocation -): void { - // Create a client. - $metadataServiceClient = new MetadataServiceClient(); - - // Prepare the request message. - $partitionValues = [$partitionValuesElement,]; - $partition = (new Partition()) - ->setValues($partitionValues) - ->setLocation($partitionLocation); - $request = (new CreatePartitionRequest()) - ->setParent($formattedParent) - ->setPartition($partition); - - // Call the API and handle any network failures. - try { - /** @var Partition $response */ - $response = $metadataServiceClient->createPartition($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = MetadataServiceClient::entityName( - '[PROJECT]', - '[LOCATION]', - '[LAKE]', - '[ZONE]', - '[ENTITY]' - ); - $partitionValuesElement = '[VALUES]'; - $partitionLocation = '[LOCATION]'; - - create_partition_sample($formattedParent, $partitionValuesElement, $partitionLocation); -} -// [END dataplex_v1_generated_MetadataService_CreatePartition_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/delete_entity.php b/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/delete_entity.php deleted file mode 100644 index 19ad24071134..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/delete_entity.php +++ /dev/null @@ -1,80 +0,0 @@ -setName($formattedName) - ->setEtag($etag); - - // Call the API and handle any network failures. - try { - $metadataServiceClient->deleteEntity($request); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = MetadataServiceClient::entityName( - '[PROJECT]', - '[LOCATION]', - '[LAKE]', - '[ZONE]', - '[ENTITY]' - ); - $etag = '[ETAG]'; - - delete_entity_sample($formattedName, $etag); -} -// [END dataplex_v1_generated_MetadataService_DeleteEntity_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/delete_partition.php b/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/delete_partition.php deleted file mode 100644 index 14b105910b6d..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/delete_partition.php +++ /dev/null @@ -1,80 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $metadataServiceClient->deletePartition($request); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = MetadataServiceClient::partitionName( - '[PROJECT]', - '[LOCATION]', - '[LAKE]', - '[ZONE]', - '[ENTITY]', - '[PARTITION]' - ); - - delete_partition_sample($formattedName); -} -// [END dataplex_v1_generated_MetadataService_DeletePartition_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/get_entity.php b/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/get_entity.php deleted file mode 100644 index c5b5c6381f74..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/get_entity.php +++ /dev/null @@ -1,78 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Entity $response */ - $response = $metadataServiceClient->getEntity($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = MetadataServiceClient::entityName( - '[PROJECT]', - '[LOCATION]', - '[LAKE]', - '[ZONE]', - '[ENTITY]' - ); - - get_entity_sample($formattedName); -} -// [END dataplex_v1_generated_MetadataService_GetEntity_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/get_iam_policy.php b/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/get_iam_policy.php deleted file mode 100644 index 5dee6b7a0d3c..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/get_iam_policy.php +++ /dev/null @@ -1,72 +0,0 @@ -setResource($resource); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $metadataServiceClient->getIamPolicy($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - get_iam_policy_sample($resource); -} -// [END dataplex_v1_generated_MetadataService_GetIamPolicy_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/get_location.php b/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/get_location.php deleted file mode 100644 index b8b0d3d9ae55..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/get_location.php +++ /dev/null @@ -1,57 +0,0 @@ -getLocation($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END dataplex_v1_generated_MetadataService_GetLocation_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/get_partition.php b/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/get_partition.php deleted file mode 100644 index 04c1aa3b9ffe..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/get_partition.php +++ /dev/null @@ -1,81 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Partition $response */ - $response = $metadataServiceClient->getPartition($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = MetadataServiceClient::partitionName( - '[PROJECT]', - '[LOCATION]', - '[LAKE]', - '[ZONE]', - '[ENTITY]', - '[PARTITION]' - ); - - get_partition_sample($formattedName); -} -// [END dataplex_v1_generated_MetadataService_GetPartition_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/list_entities.php b/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/list_entities.php deleted file mode 100644 index 5488ad7cd168..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/list_entities.php +++ /dev/null @@ -1,81 +0,0 @@ -setParent($formattedParent) - ->setView($view); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $metadataServiceClient->listEntities($request); - - /** @var Entity $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = MetadataServiceClient::zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); - $view = EntityView::ENTITY_VIEW_UNSPECIFIED; - - list_entities_sample($formattedParent, $view); -} -// [END dataplex_v1_generated_MetadataService_ListEntities_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/list_locations.php b/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/list_locations.php deleted file mode 100644 index d07767a89a31..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/list_locations.php +++ /dev/null @@ -1,62 +0,0 @@ -listLocations($request); - - /** @var Location $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END dataplex_v1_generated_MetadataService_ListLocations_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/list_partitions.php b/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/list_partitions.php deleted file mode 100644 index 67e8489eb5f6..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/list_partitions.php +++ /dev/null @@ -1,83 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $metadataServiceClient->listPartitions($request); - - /** @var Partition $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = MetadataServiceClient::entityName( - '[PROJECT]', - '[LOCATION]', - '[LAKE]', - '[ZONE]', - '[ENTITY]' - ); - - list_partitions_sample($formattedParent); -} -// [END dataplex_v1_generated_MetadataService_ListPartitions_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/set_iam_policy.php b/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/set_iam_policy.php deleted file mode 100644 index f754ec93d3e9..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/set_iam_policy.php +++ /dev/null @@ -1,77 +0,0 @@ -setResource($resource) - ->setPolicy($policy); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $metadataServiceClient->setIamPolicy($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - set_iam_policy_sample($resource); -} -// [END dataplex_v1_generated_MetadataService_SetIamPolicy_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/test_iam_permissions.php b/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/test_iam_permissions.php deleted file mode 100644 index 221ba0e06da9..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/test_iam_permissions.php +++ /dev/null @@ -1,84 +0,0 @@ -setResource($resource) - ->setPermissions($permissions); - - // Call the API and handle any network failures. - try { - /** @var TestIamPermissionsResponse $response */ - $response = $metadataServiceClient->testIamPermissions($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - $permissionsElement = '[PERMISSIONS]'; - - test_iam_permissions_sample($resource, $permissionsElement); -} -// [END dataplex_v1_generated_MetadataService_TestIamPermissions_sync] diff --git a/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/update_entity.php b/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/update_entity.php deleted file mode 100644 index f32d5173b6c9..000000000000 --- a/owl-bot-staging/Dataplex/v1/samples/V1/MetadataServiceClient/update_entity.php +++ /dev/null @@ -1,151 +0,0 @@ - - * - image/{image subtype} - * - video/{video subtype} - * - audio/{audio subtype} - * @param bool $entitySchemaUserManaged Set to `true` if user-managed or `false` if managed by Dataplex. - * The default is `false` (managed by Dataplex). - * - * - Set to `false`to enable Dataplex discovery to update the schema. - * including new data discovery, schema inference, and schema evolution. - * Users retain the ability to input and edit the schema. Dataplex - * treats schema input by the user as though produced - * by a previous Dataplex discovery operation, and it will - * evolve the schema and take action based on that treatment. - * - * - Set to `true` to fully manage the entity - * schema. This setting guarantees that Dataplex will not - * change schema fields. - */ -function update_entity_sample( - string $entityId, - int $entityType, - string $entityAsset, - string $entityDataPath, - int $entitySystem, - string $entityFormatMimeType, - bool $entitySchemaUserManaged -): void { - // Create a client. - $metadataServiceClient = new MetadataServiceClient(); - - // Prepare the request message. - $entityFormat = (new StorageFormat()) - ->setMimeType($entityFormatMimeType); - $entitySchema = (new Schema()) - ->setUserManaged($entitySchemaUserManaged); - $entity = (new Entity()) - ->setId($entityId) - ->setType($entityType) - ->setAsset($entityAsset) - ->setDataPath($entityDataPath) - ->setSystem($entitySystem) - ->setFormat($entityFormat) - ->setSchema($entitySchema); - $request = (new UpdateEntityRequest()) - ->setEntity($entity); - - // Call the API and handle any network failures. - try { - /** @var Entity $response */ - $response = $metadataServiceClient->updateEntity($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $entityId = '[ID]'; - $entityType = Type::TYPE_UNSPECIFIED; - $entityAsset = '[ASSET]'; - $entityDataPath = '[DATA_PATH]'; - $entitySystem = StorageSystem::STORAGE_SYSTEM_UNSPECIFIED; - $entityFormatMimeType = '[MIME_TYPE]'; - $entitySchemaUserManaged = false; - - update_entity_sample( - $entityId, - $entityType, - $entityAsset, - $entityDataPath, - $entitySystem, - $entityFormatMimeType, - $entitySchemaUserManaged - ); -} -// [END dataplex_v1_generated_MetadataService_UpdateEntity_sync] diff --git a/owl-bot-staging/Dataplex/v1/src/V1/CatalogServiceClient.php b/owl-bot-staging/Dataplex/v1/src/V1/CatalogServiceClient.php deleted file mode 100644 index 422fdb41c9df..000000000000 --- a/owl-bot-staging/Dataplex/v1/src/V1/CatalogServiceClient.php +++ /dev/null @@ -1,34 +0,0 @@ - self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/catalog_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/catalog_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/catalog_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/catalog_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Formats a string containing the fully-qualified path to represent a aspect_type - * resource. - * - * @param string $project - * @param string $location - * @param string $aspectType - * - * @return string The formatted aspect_type resource. - */ - public static function aspectTypeName(string $project, string $location, string $aspectType): string - { - return self::getPathTemplate('aspectType')->render([ - 'project' => $project, - 'location' => $location, - 'aspect_type' => $aspectType, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a entry - * resource. - * - * @param string $project - * @param string $location - * @param string $entryGroup - * @param string $entry - * - * @return string The formatted entry resource. - */ - public static function entryName(string $project, string $location, string $entryGroup, string $entry): string - { - return self::getPathTemplate('entry')->render([ - 'project' => $project, - 'location' => $location, - 'entry_group' => $entryGroup, - 'entry' => $entry, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a entry_group - * resource. - * - * @param string $project - * @param string $location - * @param string $entryGroup - * - * @return string The formatted entry_group resource. - */ - public static function entryGroupName(string $project, string $location, string $entryGroup): string - { - return self::getPathTemplate('entryGroup')->render([ - 'project' => $project, - 'location' => $location, - 'entry_group' => $entryGroup, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a entry_type - * resource. - * - * @param string $project - * @param string $location - * @param string $entryType - * - * @return string The formatted entry_type resource. - */ - public static function entryTypeName(string $project, string $location, string $entryType): string - { - return self::getPathTemplate('entryType')->render([ - 'project' => $project, - 'location' => $location, - 'entry_type' => $entryType, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a location - * resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted location resource. - */ - public static function locationName(string $project, string $location): string - { - return self::getPathTemplate('location')->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - aspectType: projects/{project}/locations/{location}/aspectTypes/{aspect_type} - * - entry: projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry} - * - entryGroup: projects/{project}/locations/{location}/entryGroups/{entry_group} - * - entryType: projects/{project}/locations/{location}/entryTypes/{entry_type} - * - location: projects/{project}/locations/{location} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'dataplex.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Creates an AspectType - * - * The async variant is {@see CatalogServiceClient::createAspectTypeAsync()} . - * - * @example samples/V1/CatalogServiceClient/create_aspect_type.php - * - * @param CreateAspectTypeRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createAspectType(CreateAspectTypeRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateAspectType', $request, $callOptions)->wait(); - } - - /** - * Creates an Entry. - * - * The async variant is {@see CatalogServiceClient::createEntryAsync()} . - * - * @example samples/V1/CatalogServiceClient/create_entry.php - * - * @param CreateEntryRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Entry - * - * @throws ApiException Thrown if the API call fails. - */ - public function createEntry(CreateEntryRequest $request, array $callOptions = []): Entry - { - return $this->startApiCall('CreateEntry', $request, $callOptions)->wait(); - } - - /** - * Creates an EntryGroup - * - * The async variant is {@see CatalogServiceClient::createEntryGroupAsync()} . - * - * @example samples/V1/CatalogServiceClient/create_entry_group.php - * - * @param CreateEntryGroupRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createEntryGroup(CreateEntryGroupRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateEntryGroup', $request, $callOptions)->wait(); - } - - /** - * Creates an EntryType - * - * The async variant is {@see CatalogServiceClient::createEntryTypeAsync()} . - * - * @example samples/V1/CatalogServiceClient/create_entry_type.php - * - * @param CreateEntryTypeRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createEntryType(CreateEntryTypeRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateEntryType', $request, $callOptions)->wait(); - } - - /** - * Deletes a AspectType resource. - * - * The async variant is {@see CatalogServiceClient::deleteAspectTypeAsync()} . - * - * @example samples/V1/CatalogServiceClient/delete_aspect_type.php - * - * @param DeleteAspectTypeRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteAspectType(DeleteAspectTypeRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteAspectType', $request, $callOptions)->wait(); - } - - /** - * Deletes an Entry. - * - * The async variant is {@see CatalogServiceClient::deleteEntryAsync()} . - * - * @example samples/V1/CatalogServiceClient/delete_entry.php - * - * @param DeleteEntryRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Entry - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteEntry(DeleteEntryRequest $request, array $callOptions = []): Entry - { - return $this->startApiCall('DeleteEntry', $request, $callOptions)->wait(); - } - - /** - * Deletes a EntryGroup resource. - * - * The async variant is {@see CatalogServiceClient::deleteEntryGroupAsync()} . - * - * @example samples/V1/CatalogServiceClient/delete_entry_group.php - * - * @param DeleteEntryGroupRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteEntryGroup(DeleteEntryGroupRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteEntryGroup', $request, $callOptions)->wait(); - } - - /** - * Deletes a EntryType resource. - * - * The async variant is {@see CatalogServiceClient::deleteEntryTypeAsync()} . - * - * @example samples/V1/CatalogServiceClient/delete_entry_type.php - * - * @param DeleteEntryTypeRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteEntryType(DeleteEntryTypeRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteEntryType', $request, $callOptions)->wait(); - } - - /** - * Retrieves a AspectType resource. - * - * The async variant is {@see CatalogServiceClient::getAspectTypeAsync()} . - * - * @example samples/V1/CatalogServiceClient/get_aspect_type.php - * - * @param GetAspectTypeRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return AspectType - * - * @throws ApiException Thrown if the API call fails. - */ - public function getAspectType(GetAspectTypeRequest $request, array $callOptions = []): AspectType - { - return $this->startApiCall('GetAspectType', $request, $callOptions)->wait(); - } - - /** - * Gets a single entry. - * - * The async variant is {@see CatalogServiceClient::getEntryAsync()} . - * - * @example samples/V1/CatalogServiceClient/get_entry.php - * - * @param GetEntryRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Entry - * - * @throws ApiException Thrown if the API call fails. - */ - public function getEntry(GetEntryRequest $request, array $callOptions = []): Entry - { - return $this->startApiCall('GetEntry', $request, $callOptions)->wait(); - } - - /** - * Retrieves a EntryGroup resource. - * - * The async variant is {@see CatalogServiceClient::getEntryGroupAsync()} . - * - * @example samples/V1/CatalogServiceClient/get_entry_group.php - * - * @param GetEntryGroupRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return EntryGroup - * - * @throws ApiException Thrown if the API call fails. - */ - public function getEntryGroup(GetEntryGroupRequest $request, array $callOptions = []): EntryGroup - { - return $this->startApiCall('GetEntryGroup', $request, $callOptions)->wait(); - } - - /** - * Retrieves a EntryType resource. - * - * The async variant is {@see CatalogServiceClient::getEntryTypeAsync()} . - * - * @example samples/V1/CatalogServiceClient/get_entry_type.php - * - * @param GetEntryTypeRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return EntryType - * - * @throws ApiException Thrown if the API call fails. - */ - public function getEntryType(GetEntryTypeRequest $request, array $callOptions = []): EntryType - { - return $this->startApiCall('GetEntryType', $request, $callOptions)->wait(); - } - - /** - * Lists AspectType resources in a project and location. - * - * The async variant is {@see CatalogServiceClient::listAspectTypesAsync()} . - * - * @example samples/V1/CatalogServiceClient/list_aspect_types.php - * - * @param ListAspectTypesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listAspectTypes(ListAspectTypesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListAspectTypes', $request, $callOptions); - } - - /** - * Lists entries within an entry group. - * - * The async variant is {@see CatalogServiceClient::listEntriesAsync()} . - * - * @example samples/V1/CatalogServiceClient/list_entries.php - * - * @param ListEntriesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listEntries(ListEntriesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListEntries', $request, $callOptions); - } - - /** - * Lists EntryGroup resources in a project and location. - * - * The async variant is {@see CatalogServiceClient::listEntryGroupsAsync()} . - * - * @example samples/V1/CatalogServiceClient/list_entry_groups.php - * - * @param ListEntryGroupsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listEntryGroups(ListEntryGroupsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListEntryGroups', $request, $callOptions); - } - - /** - * Lists EntryType resources in a project and location. - * - * The async variant is {@see CatalogServiceClient::listEntryTypesAsync()} . - * - * @example samples/V1/CatalogServiceClient/list_entry_types.php - * - * @param ListEntryTypesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listEntryTypes(ListEntryTypesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListEntryTypes', $request, $callOptions); - } - - /** - * Looks up a single entry. - * - * The async variant is {@see CatalogServiceClient::lookupEntryAsync()} . - * - * @example samples/V1/CatalogServiceClient/lookup_entry.php - * - * @param LookupEntryRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Entry - * - * @throws ApiException Thrown if the API call fails. - */ - public function lookupEntry(LookupEntryRequest $request, array $callOptions = []): Entry - { - return $this->startApiCall('LookupEntry', $request, $callOptions)->wait(); - } - - /** - * Searches for entries matching given query and scope. - * - * The async variant is {@see CatalogServiceClient::searchEntriesAsync()} . - * - * @example samples/V1/CatalogServiceClient/search_entries.php - * - * @param SearchEntriesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function searchEntries(SearchEntriesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('SearchEntries', $request, $callOptions); - } - - /** - * Updates a AspectType resource. - * - * The async variant is {@see CatalogServiceClient::updateAspectTypeAsync()} . - * - * @example samples/V1/CatalogServiceClient/update_aspect_type.php - * - * @param UpdateAspectTypeRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateAspectType(UpdateAspectTypeRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateAspectType', $request, $callOptions)->wait(); - } - - /** - * Updates an Entry. - * - * The async variant is {@see CatalogServiceClient::updateEntryAsync()} . - * - * @example samples/V1/CatalogServiceClient/update_entry.php - * - * @param UpdateEntryRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Entry - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateEntry(UpdateEntryRequest $request, array $callOptions = []): Entry - { - return $this->startApiCall('UpdateEntry', $request, $callOptions)->wait(); - } - - /** - * Updates a EntryGroup resource. - * - * The async variant is {@see CatalogServiceClient::updateEntryGroupAsync()} . - * - * @example samples/V1/CatalogServiceClient/update_entry_group.php - * - * @param UpdateEntryGroupRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateEntryGroup(UpdateEntryGroupRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateEntryGroup', $request, $callOptions)->wait(); - } - - /** - * Updates a EntryType resource. - * - * The async variant is {@see CatalogServiceClient::updateEntryTypeAsync()} . - * - * @example samples/V1/CatalogServiceClient/update_entry_type.php - * - * @param UpdateEntryTypeRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateEntryType(UpdateEntryTypeRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateEntryType', $request, $callOptions)->wait(); - } - - /** - * Gets the access control policy for a resource. Returns an empty policy - if the resource exists and does not have a policy set. - * - * The async variant is {@see CatalogServiceClient::getIamPolicyAsync()} . - * - * @example samples/V1/CatalogServiceClient/get_iam_policy.php - * - * @param GetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * Sets the access control policy on the specified resource. Replaces - any existing policy. - - Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` - errors. - * - * The async variant is {@see CatalogServiceClient::setIamPolicyAsync()} . - * - * @example samples/V1/CatalogServiceClient/set_iam_policy.php - * - * @param SetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * Returns permissions that a caller has on the specified resource. If the - resource does not exist, this will return an empty set of - permissions, not a `NOT_FOUND` error. - - Note: This operation is designed to be used for building - permission-aware UIs and command-line tools, not for authorization - checking. This operation may "fail open" without warning. - * - * The async variant is {@see CatalogServiceClient::testIamPermissionsAsync()} . - * - * @example samples/V1/CatalogServiceClient/test_iam_permissions.php - * - * @param TestIamPermissionsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return TestIamPermissionsResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse - { - return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); - } - - /** - * Gets information about a location. - * - * The async variant is {@see CatalogServiceClient::getLocationAsync()} . - * - * @example samples/V1/CatalogServiceClient/get_location.php - * - * @param GetLocationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Location - * - * @throws ApiException Thrown if the API call fails. - */ - public function getLocation(GetLocationRequest $request, array $callOptions = []): Location - { - return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * The async variant is {@see CatalogServiceClient::listLocationsAsync()} . - * - * @example samples/V1/CatalogServiceClient/list_locations.php - * - * @param ListLocationsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLocations', $request, $callOptions); - } -} diff --git a/owl-bot-staging/Dataplex/v1/src/V1/Client/ContentServiceClient.php b/owl-bot-staging/Dataplex/v1/src/V1/Client/ContentServiceClient.php deleted file mode 100644 index c4a14bfb5196..000000000000 --- a/owl-bot-staging/Dataplex/v1/src/V1/Client/ContentServiceClient.php +++ /dev/null @@ -1,533 +0,0 @@ - self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/content_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/content_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/content_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/content_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a content - * resource. - * - * @param string $project - * @param string $location - * @param string $lake - * @param string $content - * - * @return string The formatted content resource. - */ - public static function contentName(string $project, string $location, string $lake, string $content): string - { - return self::getPathTemplate('content')->render([ - 'project' => $project, - 'location' => $location, - 'lake' => $lake, - 'content' => $content, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a lake - * resource. - * - * @param string $project - * @param string $location - * @param string $lake - * - * @return string The formatted lake resource. - */ - public static function lakeName(string $project, string $location, string $lake): string - { - return self::getPathTemplate('lake')->render([ - 'project' => $project, - 'location' => $location, - 'lake' => $lake, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - content: projects/{project}/locations/{location}/lakes/{lake}/content/{content} - * - lake: projects/{project}/locations/{location}/lakes/{lake} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'dataplex.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Create a content. - * - * The async variant is {@see ContentServiceClient::createContentAsync()} . - * - * @example samples/V1/ContentServiceClient/create_content.php - * - * @param CreateContentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Content - * - * @throws ApiException Thrown if the API call fails. - */ - public function createContent(CreateContentRequest $request, array $callOptions = []): Content - { - return $this->startApiCall('CreateContent', $request, $callOptions)->wait(); - } - - /** - * Delete a content. - * - * The async variant is {@see ContentServiceClient::deleteContentAsync()} . - * - * @example samples/V1/ContentServiceClient/delete_content.php - * - * @param DeleteContentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteContent(DeleteContentRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteContent', $request, $callOptions)->wait(); - } - - /** - * Get a content resource. - * - * The async variant is {@see ContentServiceClient::getContentAsync()} . - * - * @example samples/V1/ContentServiceClient/get_content.php - * - * @param GetContentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Content - * - * @throws ApiException Thrown if the API call fails. - */ - public function getContent(GetContentRequest $request, array $callOptions = []): Content - { - return $this->startApiCall('GetContent', $request, $callOptions)->wait(); - } - - /** - * Gets the access control policy for a contentitem resource. A `NOT_FOUND` - * error is returned if the resource does not exist. An empty policy is - * returned if the resource exists but does not have a policy set on it. - * - * Caller must have Google IAM `dataplex.content.getIamPolicy` permission - * on the resource. - * - * The async variant is {@see ContentServiceClient::getIamPolicyAsync()} . - * - * @example samples/V1/ContentServiceClient/get_iam_policy.php - * - * @param GetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * List content. - * - * The async variant is {@see ContentServiceClient::listContentAsync()} . - * - * @example samples/V1/ContentServiceClient/list_content.php - * - * @param ListContentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listContent(ListContentRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListContent', $request, $callOptions); - } - - /** - * Sets the access control policy on the specified contentitem resource. - * Replaces any existing policy. - * - * Caller must have Google IAM `dataplex.content.setIamPolicy` permission - * on the resource. - * - * The async variant is {@see ContentServiceClient::setIamPolicyAsync()} . - * - * @example samples/V1/ContentServiceClient/set_iam_policy.php - * - * @param SetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * Returns the caller's permissions on a resource. - * If the resource does not exist, an empty set of - * permissions is returned (a `NOT_FOUND` error is not returned). - * - * A caller is not required to have Google IAM permission to make this - * request. - * - * Note: This operation is designed to be used for building permission-aware - * UIs and command-line tools, not for authorization checking. This operation - * may "fail open" without warning. - * - * The async variant is {@see ContentServiceClient::testIamPermissionsAsync()} . - * - * @example samples/V1/ContentServiceClient/test_iam_permissions.php - * - * @param TestIamPermissionsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return TestIamPermissionsResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse - { - return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); - } - - /** - * Update a content. Only supports full resource update. - * - * The async variant is {@see ContentServiceClient::updateContentAsync()} . - * - * @example samples/V1/ContentServiceClient/update_content.php - * - * @param UpdateContentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Content - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateContent(UpdateContentRequest $request, array $callOptions = []): Content - { - return $this->startApiCall('UpdateContent', $request, $callOptions)->wait(); - } - - /** - * Gets information about a location. - * - * The async variant is {@see ContentServiceClient::getLocationAsync()} . - * - * @example samples/V1/ContentServiceClient/get_location.php - * - * @param GetLocationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Location - * - * @throws ApiException Thrown if the API call fails. - */ - public function getLocation(GetLocationRequest $request, array $callOptions = []): Location - { - return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * The async variant is {@see ContentServiceClient::listLocationsAsync()} . - * - * @example samples/V1/ContentServiceClient/list_locations.php - * - * @param ListLocationsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLocations', $request, $callOptions); - } -} diff --git a/owl-bot-staging/Dataplex/v1/src/V1/Client/DataScanServiceClient.php b/owl-bot-staging/Dataplex/v1/src/V1/Client/DataScanServiceClient.php deleted file mode 100644 index b3caf2bb55f9..000000000000 --- a/owl-bot-staging/Dataplex/v1/src/V1/Client/DataScanServiceClient.php +++ /dev/null @@ -1,723 +0,0 @@ - self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/data_scan_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/data_scan_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/data_scan_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/data_scan_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Formats a string containing the fully-qualified path to represent a data_scan - * resource. - * - * @param string $project - * @param string $location - * @param string $dataScan - * - * @return string The formatted data_scan resource. - */ - public static function dataScanName(string $project, string $location, string $dataScan): string - { - return self::getPathTemplate('dataScan')->render([ - 'project' => $project, - 'location' => $location, - 'dataScan' => $dataScan, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * data_scan_job resource. - * - * @param string $project - * @param string $location - * @param string $dataScan - * @param string $job - * - * @return string The formatted data_scan_job resource. - */ - public static function dataScanJobName(string $project, string $location, string $dataScan, string $job): string - { - return self::getPathTemplate('dataScanJob')->render([ - 'project' => $project, - 'location' => $location, - 'dataScan' => $dataScan, - 'job' => $job, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a entity - * resource. - * - * @param string $project - * @param string $location - * @param string $lake - * @param string $zone - * @param string $entity - * - * @return string The formatted entity resource. - */ - public static function entityName(string $project, string $location, string $lake, string $zone, string $entity): string - { - return self::getPathTemplate('entity')->render([ - 'project' => $project, - 'location' => $location, - 'lake' => $lake, - 'zone' => $zone, - 'entity' => $entity, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a location - * resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted location resource. - */ - public static function locationName(string $project, string $location): string - { - return self::getPathTemplate('location')->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - dataScan: projects/{project}/locations/{location}/dataScans/{dataScan} - * - dataScanJob: projects/{project}/locations/{location}/dataScans/{dataScan}/jobs/{job} - * - entity: projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity} - * - location: projects/{project}/locations/{location} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'dataplex.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Creates a DataScan resource. - * - * The async variant is {@see DataScanServiceClient::createDataScanAsync()} . - * - * @example samples/V1/DataScanServiceClient/create_data_scan.php - * - * @param CreateDataScanRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createDataScan(CreateDataScanRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateDataScan', $request, $callOptions)->wait(); - } - - /** - * Deletes a DataScan resource. - * - * The async variant is {@see DataScanServiceClient::deleteDataScanAsync()} . - * - * @example samples/V1/DataScanServiceClient/delete_data_scan.php - * - * @param DeleteDataScanRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteDataScan(DeleteDataScanRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteDataScan', $request, $callOptions)->wait(); - } - - /** - * Generates recommended DataQualityRule from a data profiling DataScan. - * - * The async variant is - * {@see DataScanServiceClient::generateDataQualityRulesAsync()} . - * - * @example samples/V1/DataScanServiceClient/generate_data_quality_rules.php - * - * @param GenerateDataQualityRulesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return GenerateDataQualityRulesResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function generateDataQualityRules(GenerateDataQualityRulesRequest $request, array $callOptions = []): GenerateDataQualityRulesResponse - { - return $this->startApiCall('GenerateDataQualityRules', $request, $callOptions)->wait(); - } - - /** - * Gets a DataScan resource. - * - * The async variant is {@see DataScanServiceClient::getDataScanAsync()} . - * - * @example samples/V1/DataScanServiceClient/get_data_scan.php - * - * @param GetDataScanRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return DataScan - * - * @throws ApiException Thrown if the API call fails. - */ - public function getDataScan(GetDataScanRequest $request, array $callOptions = []): DataScan - { - return $this->startApiCall('GetDataScan', $request, $callOptions)->wait(); - } - - /** - * Gets a DataScanJob resource. - * - * The async variant is {@see DataScanServiceClient::getDataScanJobAsync()} . - * - * @example samples/V1/DataScanServiceClient/get_data_scan_job.php - * - * @param GetDataScanJobRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return DataScanJob - * - * @throws ApiException Thrown if the API call fails. - */ - public function getDataScanJob(GetDataScanJobRequest $request, array $callOptions = []): DataScanJob - { - return $this->startApiCall('GetDataScanJob', $request, $callOptions)->wait(); - } - - /** - * Lists DataScanJobs under the given DataScan. - * - * The async variant is {@see DataScanServiceClient::listDataScanJobsAsync()} . - * - * @example samples/V1/DataScanServiceClient/list_data_scan_jobs.php - * - * @param ListDataScanJobsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listDataScanJobs(ListDataScanJobsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListDataScanJobs', $request, $callOptions); - } - - /** - * Lists DataScans. - * - * The async variant is {@see DataScanServiceClient::listDataScansAsync()} . - * - * @example samples/V1/DataScanServiceClient/list_data_scans.php - * - * @param ListDataScansRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listDataScans(ListDataScansRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListDataScans', $request, $callOptions); - } - - /** - * Runs an on-demand execution of a DataScan - * - * The async variant is {@see DataScanServiceClient::runDataScanAsync()} . - * - * @example samples/V1/DataScanServiceClient/run_data_scan.php - * - * @param RunDataScanRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return RunDataScanResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function runDataScan(RunDataScanRequest $request, array $callOptions = []): RunDataScanResponse - { - return $this->startApiCall('RunDataScan', $request, $callOptions)->wait(); - } - - /** - * Updates a DataScan resource. - * - * The async variant is {@see DataScanServiceClient::updateDataScanAsync()} . - * - * @example samples/V1/DataScanServiceClient/update_data_scan.php - * - * @param UpdateDataScanRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateDataScan(UpdateDataScanRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateDataScan', $request, $callOptions)->wait(); - } - - /** - * Gets the access control policy for a resource. Returns an empty policy - if the resource exists and does not have a policy set. - * - * The async variant is {@see DataScanServiceClient::getIamPolicyAsync()} . - * - * @example samples/V1/DataScanServiceClient/get_iam_policy.php - * - * @param GetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * Sets the access control policy on the specified resource. Replaces - any existing policy. - - Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` - errors. - * - * The async variant is {@see DataScanServiceClient::setIamPolicyAsync()} . - * - * @example samples/V1/DataScanServiceClient/set_iam_policy.php - * - * @param SetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * Returns permissions that a caller has on the specified resource. If the - resource does not exist, this will return an empty set of - permissions, not a `NOT_FOUND` error. - - Note: This operation is designed to be used for building - permission-aware UIs and command-line tools, not for authorization - checking. This operation may "fail open" without warning. - * - * The async variant is {@see DataScanServiceClient::testIamPermissionsAsync()} . - * - * @example samples/V1/DataScanServiceClient/test_iam_permissions.php - * - * @param TestIamPermissionsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return TestIamPermissionsResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse - { - return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); - } - - /** - * Gets information about a location. - * - * The async variant is {@see DataScanServiceClient::getLocationAsync()} . - * - * @example samples/V1/DataScanServiceClient/get_location.php - * - * @param GetLocationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Location - * - * @throws ApiException Thrown if the API call fails. - */ - public function getLocation(GetLocationRequest $request, array $callOptions = []): Location - { - return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * The async variant is {@see DataScanServiceClient::listLocationsAsync()} . - * - * @example samples/V1/DataScanServiceClient/list_locations.php - * - * @param ListLocationsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLocations', $request, $callOptions); - } -} diff --git a/owl-bot-staging/Dataplex/v1/src/V1/Client/DataTaxonomyServiceClient.php b/owl-bot-staging/Dataplex/v1/src/V1/Client/DataTaxonomyServiceClient.php deleted file mode 100644 index c7d9c773586d..000000000000 --- a/owl-bot-staging/Dataplex/v1/src/V1/Client/DataTaxonomyServiceClient.php +++ /dev/null @@ -1,901 +0,0 @@ - self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/data_taxonomy_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/data_taxonomy_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/data_taxonomy_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/data_taxonomy_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Formats a string containing the fully-qualified path to represent a - * data_attribute resource. - * - * @param string $project - * @param string $location - * @param string $dataTaxonomy - * @param string $dataAttributeId - * - * @return string The formatted data_attribute resource. - */ - public static function dataAttributeName(string $project, string $location, string $dataTaxonomy, string $dataAttributeId): string - { - return self::getPathTemplate('dataAttribute')->render([ - 'project' => $project, - 'location' => $location, - 'dataTaxonomy' => $dataTaxonomy, - 'data_attribute_id' => $dataAttributeId, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * data_attribute_binding resource. - * - * @param string $project - * @param string $location - * @param string $dataAttributeBindingId - * - * @return string The formatted data_attribute_binding resource. - */ - public static function dataAttributeBindingName(string $project, string $location, string $dataAttributeBindingId): string - { - return self::getPathTemplate('dataAttributeBinding')->render([ - 'project' => $project, - 'location' => $location, - 'data_attribute_binding_id' => $dataAttributeBindingId, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * data_taxonomy resource. - * - * @param string $project - * @param string $location - * @param string $dataTaxonomyId - * - * @return string The formatted data_taxonomy resource. - */ - public static function dataTaxonomyName(string $project, string $location, string $dataTaxonomyId): string - { - return self::getPathTemplate('dataTaxonomy')->render([ - 'project' => $project, - 'location' => $location, - 'data_taxonomy_id' => $dataTaxonomyId, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a location - * resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted location resource. - */ - public static function locationName(string $project, string $location): string - { - return self::getPathTemplate('location')->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - dataAttribute: projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id} - * - dataAttributeBinding: projects/{project}/locations/{location}/dataAttributeBindings/{data_attribute_binding_id} - * - dataTaxonomy: projects/{project}/locations/{location}/dataTaxonomies/{data_taxonomy_id} - * - location: projects/{project}/locations/{location} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'dataplex.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Create a DataAttribute resource. - * - * The async variant is - * {@see DataTaxonomyServiceClient::createDataAttributeAsync()} . - * - * @example samples/V1/DataTaxonomyServiceClient/create_data_attribute.php - * - * @param CreateDataAttributeRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createDataAttribute(CreateDataAttributeRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateDataAttribute', $request, $callOptions)->wait(); - } - - /** - * Create a DataAttributeBinding resource. - * - * The async variant is - * {@see DataTaxonomyServiceClient::createDataAttributeBindingAsync()} . - * - * @example samples/V1/DataTaxonomyServiceClient/create_data_attribute_binding.php - * - * @param CreateDataAttributeBindingRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createDataAttributeBinding(CreateDataAttributeBindingRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateDataAttributeBinding', $request, $callOptions)->wait(); - } - - /** - * Create a DataTaxonomy resource. - * - * The async variant is {@see DataTaxonomyServiceClient::createDataTaxonomyAsync()} - * . - * - * @example samples/V1/DataTaxonomyServiceClient/create_data_taxonomy.php - * - * @param CreateDataTaxonomyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createDataTaxonomy(CreateDataTaxonomyRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateDataTaxonomy', $request, $callOptions)->wait(); - } - - /** - * Deletes a Data Attribute resource. - * - * The async variant is - * {@see DataTaxonomyServiceClient::deleteDataAttributeAsync()} . - * - * @example samples/V1/DataTaxonomyServiceClient/delete_data_attribute.php - * - * @param DeleteDataAttributeRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteDataAttribute(DeleteDataAttributeRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteDataAttribute', $request, $callOptions)->wait(); - } - - /** - * Deletes a DataAttributeBinding resource. All attributes within the - * DataAttributeBinding must be deleted before the DataAttributeBinding can be - * deleted. - * - * The async variant is - * {@see DataTaxonomyServiceClient::deleteDataAttributeBindingAsync()} . - * - * @example samples/V1/DataTaxonomyServiceClient/delete_data_attribute_binding.php - * - * @param DeleteDataAttributeBindingRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteDataAttributeBinding(DeleteDataAttributeBindingRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteDataAttributeBinding', $request, $callOptions)->wait(); - } - - /** - * Deletes a DataTaxonomy resource. All attributes within the DataTaxonomy - * must be deleted before the DataTaxonomy can be deleted. - * - * The async variant is {@see DataTaxonomyServiceClient::deleteDataTaxonomyAsync()} - * . - * - * @example samples/V1/DataTaxonomyServiceClient/delete_data_taxonomy.php - * - * @param DeleteDataTaxonomyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteDataTaxonomy(DeleteDataTaxonomyRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteDataTaxonomy', $request, $callOptions)->wait(); - } - - /** - * Retrieves a Data Attribute resource. - * - * The async variant is {@see DataTaxonomyServiceClient::getDataAttributeAsync()} . - * - * @example samples/V1/DataTaxonomyServiceClient/get_data_attribute.php - * - * @param GetDataAttributeRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return DataAttribute - * - * @throws ApiException Thrown if the API call fails. - */ - public function getDataAttribute(GetDataAttributeRequest $request, array $callOptions = []): DataAttribute - { - return $this->startApiCall('GetDataAttribute', $request, $callOptions)->wait(); - } - - /** - * Retrieves a DataAttributeBinding resource. - * - * The async variant is - * {@see DataTaxonomyServiceClient::getDataAttributeBindingAsync()} . - * - * @example samples/V1/DataTaxonomyServiceClient/get_data_attribute_binding.php - * - * @param GetDataAttributeBindingRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return DataAttributeBinding - * - * @throws ApiException Thrown if the API call fails. - */ - public function getDataAttributeBinding(GetDataAttributeBindingRequest $request, array $callOptions = []): DataAttributeBinding - { - return $this->startApiCall('GetDataAttributeBinding', $request, $callOptions)->wait(); - } - - /** - * Retrieves a DataTaxonomy resource. - * - * The async variant is {@see DataTaxonomyServiceClient::getDataTaxonomyAsync()} . - * - * @example samples/V1/DataTaxonomyServiceClient/get_data_taxonomy.php - * - * @param GetDataTaxonomyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return DataTaxonomy - * - * @throws ApiException Thrown if the API call fails. - */ - public function getDataTaxonomy(GetDataTaxonomyRequest $request, array $callOptions = []): DataTaxonomy - { - return $this->startApiCall('GetDataTaxonomy', $request, $callOptions)->wait(); - } - - /** - * Lists DataAttributeBinding resources in a project and location. - * - * The async variant is - * {@see DataTaxonomyServiceClient::listDataAttributeBindingsAsync()} . - * - * @example samples/V1/DataTaxonomyServiceClient/list_data_attribute_bindings.php - * - * @param ListDataAttributeBindingsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listDataAttributeBindings(ListDataAttributeBindingsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListDataAttributeBindings', $request, $callOptions); - } - - /** - * Lists Data Attribute resources in a DataTaxonomy. - * - * The async variant is {@see DataTaxonomyServiceClient::listDataAttributesAsync()} - * . - * - * @example samples/V1/DataTaxonomyServiceClient/list_data_attributes.php - * - * @param ListDataAttributesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listDataAttributes(ListDataAttributesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListDataAttributes', $request, $callOptions); - } - - /** - * Lists DataTaxonomy resources in a project and location. - * - * The async variant is {@see DataTaxonomyServiceClient::listDataTaxonomiesAsync()} - * . - * - * @example samples/V1/DataTaxonomyServiceClient/list_data_taxonomies.php - * - * @param ListDataTaxonomiesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listDataTaxonomies(ListDataTaxonomiesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListDataTaxonomies', $request, $callOptions); - } - - /** - * Updates a DataAttribute resource. - * - * The async variant is - * {@see DataTaxonomyServiceClient::updateDataAttributeAsync()} . - * - * @example samples/V1/DataTaxonomyServiceClient/update_data_attribute.php - * - * @param UpdateDataAttributeRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateDataAttribute(UpdateDataAttributeRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateDataAttribute', $request, $callOptions)->wait(); - } - - /** - * Updates a DataAttributeBinding resource. - * - * The async variant is - * {@see DataTaxonomyServiceClient::updateDataAttributeBindingAsync()} . - * - * @example samples/V1/DataTaxonomyServiceClient/update_data_attribute_binding.php - * - * @param UpdateDataAttributeBindingRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateDataAttributeBinding(UpdateDataAttributeBindingRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateDataAttributeBinding', $request, $callOptions)->wait(); - } - - /** - * Updates a DataTaxonomy resource. - * - * The async variant is {@see DataTaxonomyServiceClient::updateDataTaxonomyAsync()} - * . - * - * @example samples/V1/DataTaxonomyServiceClient/update_data_taxonomy.php - * - * @param UpdateDataTaxonomyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateDataTaxonomy(UpdateDataTaxonomyRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateDataTaxonomy', $request, $callOptions)->wait(); - } - - /** - * Gets the access control policy for a resource. Returns an empty policy - if the resource exists and does not have a policy set. - * - * The async variant is {@see DataTaxonomyServiceClient::getIamPolicyAsync()} . - * - * @example samples/V1/DataTaxonomyServiceClient/get_iam_policy.php - * - * @param GetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * Sets the access control policy on the specified resource. Replaces - any existing policy. - - Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` - errors. - * - * The async variant is {@see DataTaxonomyServiceClient::setIamPolicyAsync()} . - * - * @example samples/V1/DataTaxonomyServiceClient/set_iam_policy.php - * - * @param SetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * Returns permissions that a caller has on the specified resource. If the - resource does not exist, this will return an empty set of - permissions, not a `NOT_FOUND` error. - - Note: This operation is designed to be used for building - permission-aware UIs and command-line tools, not for authorization - checking. This operation may "fail open" without warning. - * - * The async variant is {@see DataTaxonomyServiceClient::testIamPermissionsAsync()} - * . - * - * @example samples/V1/DataTaxonomyServiceClient/test_iam_permissions.php - * - * @param TestIamPermissionsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return TestIamPermissionsResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse - { - return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); - } - - /** - * Gets information about a location. - * - * The async variant is {@see DataTaxonomyServiceClient::getLocationAsync()} . - * - * @example samples/V1/DataTaxonomyServiceClient/get_location.php - * - * @param GetLocationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Location - * - * @throws ApiException Thrown if the API call fails. - */ - public function getLocation(GetLocationRequest $request, array $callOptions = []): Location - { - return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * The async variant is {@see DataTaxonomyServiceClient::listLocationsAsync()} . - * - * @example samples/V1/DataTaxonomyServiceClient/list_locations.php - * - * @param ListLocationsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLocations', $request, $callOptions); - } -} diff --git a/owl-bot-staging/Dataplex/v1/src/V1/Client/DataplexServiceClient.php b/owl-bot-staging/Dataplex/v1/src/V1/Client/DataplexServiceClient.php deleted file mode 100644 index 086c413ad0a0..000000000000 --- a/owl-bot-staging/Dataplex/v1/src/V1/Client/DataplexServiceClient.php +++ /dev/null @@ -1,1469 +0,0 @@ - self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/dataplex_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/dataplex_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/dataplex_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/dataplex_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Formats a string containing the fully-qualified path to represent a asset - * resource. - * - * @param string $project - * @param string $location - * @param string $lake - * @param string $zone - * @param string $asset - * - * @return string The formatted asset resource. - */ - public static function assetName(string $project, string $location, string $lake, string $zone, string $asset): string - { - return self::getPathTemplate('asset')->render([ - 'project' => $project, - 'location' => $location, - 'lake' => $lake, - 'zone' => $zone, - 'asset' => $asset, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a environment - * resource. - * - * @param string $project - * @param string $location - * @param string $lake - * @param string $environment - * - * @return string The formatted environment resource. - */ - public static function environmentName(string $project, string $location, string $lake, string $environment): string - { - return self::getPathTemplate('environment')->render([ - 'project' => $project, - 'location' => $location, - 'lake' => $lake, - 'environment' => $environment, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a job - * resource. - * - * @param string $project - * @param string $location - * @param string $lake - * @param string $task - * @param string $job - * - * @return string The formatted job resource. - */ - public static function jobName(string $project, string $location, string $lake, string $task, string $job): string - { - return self::getPathTemplate('job')->render([ - 'project' => $project, - 'location' => $location, - 'lake' => $lake, - 'task' => $task, - 'job' => $job, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a lake - * resource. - * - * @param string $project - * @param string $location - * @param string $lake - * - * @return string The formatted lake resource. - */ - public static function lakeName(string $project, string $location, string $lake): string - { - return self::getPathTemplate('lake')->render([ - 'project' => $project, - 'location' => $location, - 'lake' => $lake, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a location - * resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted location resource. - */ - public static function locationName(string $project, string $location): string - { - return self::getPathTemplate('location')->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a task - * resource. - * - * @param string $project - * @param string $location - * @param string $lake - * @param string $task - * - * @return string The formatted task resource. - */ - public static function taskName(string $project, string $location, string $lake, string $task): string - { - return self::getPathTemplate('task')->render([ - 'project' => $project, - 'location' => $location, - 'lake' => $lake, - 'task' => $task, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a zone - * resource. - * - * @param string $project - * @param string $location - * @param string $lake - * @param string $zone - * - * @return string The formatted zone resource. - */ - public static function zoneName(string $project, string $location, string $lake, string $zone): string - { - return self::getPathTemplate('zone')->render([ - 'project' => $project, - 'location' => $location, - 'lake' => $lake, - 'zone' => $zone, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - asset: projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset} - * - environment: projects/{project}/locations/{location}/lakes/{lake}/environments/{environment} - * - job: projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}/jobs/{job} - * - lake: projects/{project}/locations/{location}/lakes/{lake} - * - location: projects/{project}/locations/{location} - * - task: projects/{project}/locations/{location}/lakes/{lake}/tasks/{task} - * - zone: projects/{project}/locations/{location}/lakes/{lake}/zones/{zone} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'dataplex.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Cancel jobs running for the task resource. - * - * The async variant is {@see DataplexServiceClient::cancelJobAsync()} . - * - * @example samples/V1/DataplexServiceClient/cancel_job.php - * - * @param CancelJobRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException Thrown if the API call fails. - */ - public function cancelJob(CancelJobRequest $request, array $callOptions = []): void - { - $this->startApiCall('CancelJob', $request, $callOptions)->wait(); - } - - /** - * Creates an asset resource. - * - * The async variant is {@see DataplexServiceClient::createAssetAsync()} . - * - * @example samples/V1/DataplexServiceClient/create_asset.php - * - * @param CreateAssetRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createAsset(CreateAssetRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateAsset', $request, $callOptions)->wait(); - } - - /** - * Create an environment resource. - * - * The async variant is {@see DataplexServiceClient::createEnvironmentAsync()} . - * - * @example samples/V1/DataplexServiceClient/create_environment.php - * - * @param CreateEnvironmentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createEnvironment(CreateEnvironmentRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateEnvironment', $request, $callOptions)->wait(); - } - - /** - * Creates a lake resource. - * - * The async variant is {@see DataplexServiceClient::createLakeAsync()} . - * - * @example samples/V1/DataplexServiceClient/create_lake.php - * - * @param CreateLakeRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createLake(CreateLakeRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateLake', $request, $callOptions)->wait(); - } - - /** - * Creates a task resource within a lake. - * - * The async variant is {@see DataplexServiceClient::createTaskAsync()} . - * - * @example samples/V1/DataplexServiceClient/create_task.php - * - * @param CreateTaskRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createTask(CreateTaskRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateTask', $request, $callOptions)->wait(); - } - - /** - * Creates a zone resource within a lake. - * - * The async variant is {@see DataplexServiceClient::createZoneAsync()} . - * - * @example samples/V1/DataplexServiceClient/create_zone.php - * - * @param CreateZoneRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createZone(CreateZoneRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateZone', $request, $callOptions)->wait(); - } - - /** - * Deletes an asset resource. The referenced storage resource is detached - * (default) or deleted based on the associated Lifecycle policy. - * - * The async variant is {@see DataplexServiceClient::deleteAssetAsync()} . - * - * @example samples/V1/DataplexServiceClient/delete_asset.php - * - * @param DeleteAssetRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteAsset(DeleteAssetRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteAsset', $request, $callOptions)->wait(); - } - - /** - * Delete the environment resource. All the child resources must have been - * deleted before environment deletion can be initiated. - * - * The async variant is {@see DataplexServiceClient::deleteEnvironmentAsync()} . - * - * @example samples/V1/DataplexServiceClient/delete_environment.php - * - * @param DeleteEnvironmentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteEnvironment(DeleteEnvironmentRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteEnvironment', $request, $callOptions)->wait(); - } - - /** - * Deletes a lake resource. All zones within the lake must be deleted before - * the lake can be deleted. - * - * The async variant is {@see DataplexServiceClient::deleteLakeAsync()} . - * - * @example samples/V1/DataplexServiceClient/delete_lake.php - * - * @param DeleteLakeRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteLake(DeleteLakeRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteLake', $request, $callOptions)->wait(); - } - - /** - * Delete the task resource. - * - * The async variant is {@see DataplexServiceClient::deleteTaskAsync()} . - * - * @example samples/V1/DataplexServiceClient/delete_task.php - * - * @param DeleteTaskRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteTask(DeleteTaskRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteTask', $request, $callOptions)->wait(); - } - - /** - * Deletes a zone resource. All assets within a zone must be deleted before - * the zone can be deleted. - * - * The async variant is {@see DataplexServiceClient::deleteZoneAsync()} . - * - * @example samples/V1/DataplexServiceClient/delete_zone.php - * - * @param DeleteZoneRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteZone(DeleteZoneRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteZone', $request, $callOptions)->wait(); - } - - /** - * Retrieves an asset resource. - * - * The async variant is {@see DataplexServiceClient::getAssetAsync()} . - * - * @example samples/V1/DataplexServiceClient/get_asset.php - * - * @param GetAssetRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Asset - * - * @throws ApiException Thrown if the API call fails. - */ - public function getAsset(GetAssetRequest $request, array $callOptions = []): Asset - { - return $this->startApiCall('GetAsset', $request, $callOptions)->wait(); - } - - /** - * Get environment resource. - * - * The async variant is {@see DataplexServiceClient::getEnvironmentAsync()} . - * - * @example samples/V1/DataplexServiceClient/get_environment.php - * - * @param GetEnvironmentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Environment - * - * @throws ApiException Thrown if the API call fails. - */ - public function getEnvironment(GetEnvironmentRequest $request, array $callOptions = []): Environment - { - return $this->startApiCall('GetEnvironment', $request, $callOptions)->wait(); - } - - /** - * Get job resource. - * - * The async variant is {@see DataplexServiceClient::getJobAsync()} . - * - * @example samples/V1/DataplexServiceClient/get_job.php - * - * @param GetJobRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Job - * - * @throws ApiException Thrown if the API call fails. - */ - public function getJob(GetJobRequest $request, array $callOptions = []): Job - { - return $this->startApiCall('GetJob', $request, $callOptions)->wait(); - } - - /** - * Retrieves a lake resource. - * - * The async variant is {@see DataplexServiceClient::getLakeAsync()} . - * - * @example samples/V1/DataplexServiceClient/get_lake.php - * - * @param GetLakeRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Lake - * - * @throws ApiException Thrown if the API call fails. - */ - public function getLake(GetLakeRequest $request, array $callOptions = []): Lake - { - return $this->startApiCall('GetLake', $request, $callOptions)->wait(); - } - - /** - * Get task resource. - * - * The async variant is {@see DataplexServiceClient::getTaskAsync()} . - * - * @example samples/V1/DataplexServiceClient/get_task.php - * - * @param GetTaskRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Task - * - * @throws ApiException Thrown if the API call fails. - */ - public function getTask(GetTaskRequest $request, array $callOptions = []): Task - { - return $this->startApiCall('GetTask', $request, $callOptions)->wait(); - } - - /** - * Retrieves a zone resource. - * - * The async variant is {@see DataplexServiceClient::getZoneAsync()} . - * - * @example samples/V1/DataplexServiceClient/get_zone.php - * - * @param GetZoneRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Zone - * - * @throws ApiException Thrown if the API call fails. - */ - public function getZone(GetZoneRequest $request, array $callOptions = []): Zone - { - return $this->startApiCall('GetZone', $request, $callOptions)->wait(); - } - - /** - * Lists action resources in an asset. - * - * The async variant is {@see DataplexServiceClient::listAssetActionsAsync()} . - * - * @example samples/V1/DataplexServiceClient/list_asset_actions.php - * - * @param ListAssetActionsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listAssetActions(ListAssetActionsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListAssetActions', $request, $callOptions); - } - - /** - * Lists asset resources in a zone. - * - * The async variant is {@see DataplexServiceClient::listAssetsAsync()} . - * - * @example samples/V1/DataplexServiceClient/list_assets.php - * - * @param ListAssetsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listAssets(ListAssetsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListAssets', $request, $callOptions); - } - - /** - * Lists environments under the given lake. - * - * The async variant is {@see DataplexServiceClient::listEnvironmentsAsync()} . - * - * @example samples/V1/DataplexServiceClient/list_environments.php - * - * @param ListEnvironmentsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listEnvironments(ListEnvironmentsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListEnvironments', $request, $callOptions); - } - - /** - * Lists Jobs under the given task. - * - * The async variant is {@see DataplexServiceClient::listJobsAsync()} . - * - * @example samples/V1/DataplexServiceClient/list_jobs.php - * - * @param ListJobsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listJobs(ListJobsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListJobs', $request, $callOptions); - } - - /** - * Lists action resources in a lake. - * - * The async variant is {@see DataplexServiceClient::listLakeActionsAsync()} . - * - * @example samples/V1/DataplexServiceClient/list_lake_actions.php - * - * @param ListLakeActionsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listLakeActions(ListLakeActionsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLakeActions', $request, $callOptions); - } - - /** - * Lists lake resources in a project and location. - * - * The async variant is {@see DataplexServiceClient::listLakesAsync()} . - * - * @example samples/V1/DataplexServiceClient/list_lakes.php - * - * @param ListLakesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listLakes(ListLakesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLakes', $request, $callOptions); - } - - /** - * Lists session resources in an environment. - * - * The async variant is {@see DataplexServiceClient::listSessionsAsync()} . - * - * @example samples/V1/DataplexServiceClient/list_sessions.php - * - * @param ListSessionsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listSessions(ListSessionsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListSessions', $request, $callOptions); - } - - /** - * Lists tasks under the given lake. - * - * The async variant is {@see DataplexServiceClient::listTasksAsync()} . - * - * @example samples/V1/DataplexServiceClient/list_tasks.php - * - * @param ListTasksRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listTasks(ListTasksRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListTasks', $request, $callOptions); - } - - /** - * Lists action resources in a zone. - * - * The async variant is {@see DataplexServiceClient::listZoneActionsAsync()} . - * - * @example samples/V1/DataplexServiceClient/list_zone_actions.php - * - * @param ListZoneActionsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listZoneActions(ListZoneActionsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListZoneActions', $request, $callOptions); - } - - /** - * Lists zone resources in a lake. - * - * The async variant is {@see DataplexServiceClient::listZonesAsync()} . - * - * @example samples/V1/DataplexServiceClient/list_zones.php - * - * @param ListZonesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listZones(ListZonesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListZones', $request, $callOptions); - } - - /** - * Run an on demand execution of a Task. - * - * The async variant is {@see DataplexServiceClient::runTaskAsync()} . - * - * @example samples/V1/DataplexServiceClient/run_task.php - * - * @param RunTaskRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return RunTaskResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function runTask(RunTaskRequest $request, array $callOptions = []): RunTaskResponse - { - return $this->startApiCall('RunTask', $request, $callOptions)->wait(); - } - - /** - * Updates an asset resource. - * - * The async variant is {@see DataplexServiceClient::updateAssetAsync()} . - * - * @example samples/V1/DataplexServiceClient/update_asset.php - * - * @param UpdateAssetRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateAsset(UpdateAssetRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateAsset', $request, $callOptions)->wait(); - } - - /** - * Update the environment resource. - * - * The async variant is {@see DataplexServiceClient::updateEnvironmentAsync()} . - * - * @example samples/V1/DataplexServiceClient/update_environment.php - * - * @param UpdateEnvironmentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateEnvironment(UpdateEnvironmentRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateEnvironment', $request, $callOptions)->wait(); - } - - /** - * Updates a lake resource. - * - * The async variant is {@see DataplexServiceClient::updateLakeAsync()} . - * - * @example samples/V1/DataplexServiceClient/update_lake.php - * - * @param UpdateLakeRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateLake(UpdateLakeRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateLake', $request, $callOptions)->wait(); - } - - /** - * Update the task resource. - * - * The async variant is {@see DataplexServiceClient::updateTaskAsync()} . - * - * @example samples/V1/DataplexServiceClient/update_task.php - * - * @param UpdateTaskRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateTask(UpdateTaskRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateTask', $request, $callOptions)->wait(); - } - - /** - * Updates a zone resource. - * - * The async variant is {@see DataplexServiceClient::updateZoneAsync()} . - * - * @example samples/V1/DataplexServiceClient/update_zone.php - * - * @param UpdateZoneRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateZone(UpdateZoneRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateZone', $request, $callOptions)->wait(); - } - - /** - * Gets the access control policy for a resource. Returns an empty policy - if the resource exists and does not have a policy set. - * - * The async variant is {@see DataplexServiceClient::getIamPolicyAsync()} . - * - * @example samples/V1/DataplexServiceClient/get_iam_policy.php - * - * @param GetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * Sets the access control policy on the specified resource. Replaces - any existing policy. - - Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` - errors. - * - * The async variant is {@see DataplexServiceClient::setIamPolicyAsync()} . - * - * @example samples/V1/DataplexServiceClient/set_iam_policy.php - * - * @param SetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * Returns permissions that a caller has on the specified resource. If the - resource does not exist, this will return an empty set of - permissions, not a `NOT_FOUND` error. - - Note: This operation is designed to be used for building - permission-aware UIs and command-line tools, not for authorization - checking. This operation may "fail open" without warning. - * - * The async variant is {@see DataplexServiceClient::testIamPermissionsAsync()} . - * - * @example samples/V1/DataplexServiceClient/test_iam_permissions.php - * - * @param TestIamPermissionsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return TestIamPermissionsResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse - { - return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); - } - - /** - * Gets information about a location. - * - * The async variant is {@see DataplexServiceClient::getLocationAsync()} . - * - * @example samples/V1/DataplexServiceClient/get_location.php - * - * @param GetLocationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Location - * - * @throws ApiException Thrown if the API call fails. - */ - public function getLocation(GetLocationRequest $request, array $callOptions = []): Location - { - return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * The async variant is {@see DataplexServiceClient::listLocationsAsync()} . - * - * @example samples/V1/DataplexServiceClient/list_locations.php - * - * @param ListLocationsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLocations', $request, $callOptions); - } -} diff --git a/owl-bot-staging/Dataplex/v1/src/V1/Client/MetadataServiceClient.php b/owl-bot-staging/Dataplex/v1/src/V1/Client/MetadataServiceClient.php deleted file mode 100644 index c5a662d20214..000000000000 --- a/owl-bot-staging/Dataplex/v1/src/V1/Client/MetadataServiceClient.php +++ /dev/null @@ -1,668 +0,0 @@ - self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/metadata_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/metadata_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/metadata_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/metadata_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a entity - * resource. - * - * @param string $project - * @param string $location - * @param string $lake - * @param string $zone - * @param string $entity - * - * @return string The formatted entity resource. - */ - public static function entityName(string $project, string $location, string $lake, string $zone, string $entity): string - { - return self::getPathTemplate('entity')->render([ - 'project' => $project, - 'location' => $location, - 'lake' => $lake, - 'zone' => $zone, - 'entity' => $entity, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a partition - * resource. - * - * @param string $project - * @param string $location - * @param string $lake - * @param string $zone - * @param string $entity - * @param string $partition - * - * @return string The formatted partition resource. - */ - public static function partitionName(string $project, string $location, string $lake, string $zone, string $entity, string $partition): string - { - return self::getPathTemplate('partition')->render([ - 'project' => $project, - 'location' => $location, - 'lake' => $lake, - 'zone' => $zone, - 'entity' => $entity, - 'partition' => $partition, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a zone - * resource. - * - * @param string $project - * @param string $location - * @param string $lake - * @param string $zone - * - * @return string The formatted zone resource. - */ - public static function zoneName(string $project, string $location, string $lake, string $zone): string - { - return self::getPathTemplate('zone')->render([ - 'project' => $project, - 'location' => $location, - 'lake' => $lake, - 'zone' => $zone, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - entity: projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity} - * - partition: projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}/partitions/{partition} - * - zone: projects/{project}/locations/{location}/lakes/{lake}/zones/{zone} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'dataplex.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Create a metadata entity. - * - * The async variant is {@see MetadataServiceClient::createEntityAsync()} . - * - * @example samples/V1/MetadataServiceClient/create_entity.php - * - * @param CreateEntityRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Entity - * - * @throws ApiException Thrown if the API call fails. - */ - public function createEntity(CreateEntityRequest $request, array $callOptions = []): Entity - { - return $this->startApiCall('CreateEntity', $request, $callOptions)->wait(); - } - - /** - * Create a metadata partition. - * - * The async variant is {@see MetadataServiceClient::createPartitionAsync()} . - * - * @example samples/V1/MetadataServiceClient/create_partition.php - * - * @param CreatePartitionRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Partition - * - * @throws ApiException Thrown if the API call fails. - */ - public function createPartition(CreatePartitionRequest $request, array $callOptions = []): Partition - { - return $this->startApiCall('CreatePartition', $request, $callOptions)->wait(); - } - - /** - * Delete a metadata entity. - * - * The async variant is {@see MetadataServiceClient::deleteEntityAsync()} . - * - * @example samples/V1/MetadataServiceClient/delete_entity.php - * - * @param DeleteEntityRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteEntity(DeleteEntityRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteEntity', $request, $callOptions)->wait(); - } - - /** - * Delete a metadata partition. - * - * The async variant is {@see MetadataServiceClient::deletePartitionAsync()} . - * - * @example samples/V1/MetadataServiceClient/delete_partition.php - * - * @param DeletePartitionRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException Thrown if the API call fails. - */ - public function deletePartition(DeletePartitionRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeletePartition', $request, $callOptions)->wait(); - } - - /** - * Get a metadata entity. - * - * The async variant is {@see MetadataServiceClient::getEntityAsync()} . - * - * @example samples/V1/MetadataServiceClient/get_entity.php - * - * @param GetEntityRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Entity - * - * @throws ApiException Thrown if the API call fails. - */ - public function getEntity(GetEntityRequest $request, array $callOptions = []): Entity - { - return $this->startApiCall('GetEntity', $request, $callOptions)->wait(); - } - - /** - * Get a metadata partition of an entity. - * - * The async variant is {@see MetadataServiceClient::getPartitionAsync()} . - * - * @example samples/V1/MetadataServiceClient/get_partition.php - * - * @param GetPartitionRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Partition - * - * @throws ApiException Thrown if the API call fails. - */ - public function getPartition(GetPartitionRequest $request, array $callOptions = []): Partition - { - return $this->startApiCall('GetPartition', $request, $callOptions)->wait(); - } - - /** - * List metadata entities in a zone. - * - * The async variant is {@see MetadataServiceClient::listEntitiesAsync()} . - * - * @example samples/V1/MetadataServiceClient/list_entities.php - * - * @param ListEntitiesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listEntities(ListEntitiesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListEntities', $request, $callOptions); - } - - /** - * List metadata partitions of an entity. - * - * The async variant is {@see MetadataServiceClient::listPartitionsAsync()} . - * - * @example samples/V1/MetadataServiceClient/list_partitions.php - * - * @param ListPartitionsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listPartitions(ListPartitionsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListPartitions', $request, $callOptions); - } - - /** - * Update a metadata entity. Only supports full resource update. - * - * The async variant is {@see MetadataServiceClient::updateEntityAsync()} . - * - * @example samples/V1/MetadataServiceClient/update_entity.php - * - * @param UpdateEntityRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Entity - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateEntity(UpdateEntityRequest $request, array $callOptions = []): Entity - { - return $this->startApiCall('UpdateEntity', $request, $callOptions)->wait(); - } - - /** - * Gets the access control policy for a resource. Returns an empty policy - if the resource exists and does not have a policy set. - * - * The async variant is {@see MetadataServiceClient::getIamPolicyAsync()} . - * - * @example samples/V1/MetadataServiceClient/get_iam_policy.php - * - * @param GetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * Sets the access control policy on the specified resource. Replaces - any existing policy. - - Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` - errors. - * - * The async variant is {@see MetadataServiceClient::setIamPolicyAsync()} . - * - * @example samples/V1/MetadataServiceClient/set_iam_policy.php - * - * @param SetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * Returns permissions that a caller has on the specified resource. If the - resource does not exist, this will return an empty set of - permissions, not a `NOT_FOUND` error. - - Note: This operation is designed to be used for building - permission-aware UIs and command-line tools, not for authorization - checking. This operation may "fail open" without warning. - * - * The async variant is {@see MetadataServiceClient::testIamPermissionsAsync()} . - * - * @example samples/V1/MetadataServiceClient/test_iam_permissions.php - * - * @param TestIamPermissionsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return TestIamPermissionsResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse - { - return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); - } - - /** - * Gets information about a location. - * - * The async variant is {@see MetadataServiceClient::getLocationAsync()} . - * - * @example samples/V1/MetadataServiceClient/get_location.php - * - * @param GetLocationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Location - * - * @throws ApiException Thrown if the API call fails. - */ - public function getLocation(GetLocationRequest $request, array $callOptions = []): Location - { - return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * The async variant is {@see MetadataServiceClient::listLocationsAsync()} . - * - * @example samples/V1/MetadataServiceClient/list_locations.php - * - * @param ListLocationsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLocations', $request, $callOptions); - } -} diff --git a/owl-bot-staging/Dataplex/v1/src/V1/ContentServiceClient.php b/owl-bot-staging/Dataplex/v1/src/V1/ContentServiceClient.php deleted file mode 100644 index cac83133a509..000000000000 --- a/owl-bot-staging/Dataplex/v1/src/V1/ContentServiceClient.php +++ /dev/null @@ -1,34 +0,0 @@ -locationName('[PROJECT]', '[LOCATION]'); - * $aspectTypeId = 'aspect_type_id'; - * $aspectType = new AspectType(); - * $operationResponse = $catalogServiceClient->createAspectType($formattedParent, $aspectTypeId, $aspectType); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $catalogServiceClient->createAspectType($formattedParent, $aspectTypeId, $aspectType); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $catalogServiceClient->resumeOperation($operationName, 'createAspectType'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $catalogServiceClient->close(); - * } - * ``` - * - * Many parameters require resource names to be formatted in a particular way. To - * assist with these names, this class includes a format method for each type of - * name, and additionally a parseName method to extract the individual identifiers - * contained within formatted names that are returned by the API. - * - * @deprecated Please use the new service client {@see \Google\Cloud\Dataplex\V1\Client\CatalogServiceClient}. - */ -class CatalogServiceGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.dataplex.v1.CatalogService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - const SERVICE_ADDRESS = 'dataplex.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'dataplex.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private static $aspectTypeNameTemplate; - - private static $entryNameTemplate; - - private static $entryGroupNameTemplate; - - private static $entryTypeNameTemplate; - - private static $locationNameTemplate; - - private static $pathTemplateMap; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/catalog_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/catalog_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/catalog_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/catalog_service_rest_client_config.php', - ], - ], - ]; - } - - private static function getAspectTypeNameTemplate() - { - if (self::$aspectTypeNameTemplate == null) { - self::$aspectTypeNameTemplate = new PathTemplate('projects/{project}/locations/{location}/aspectTypes/{aspect_type}'); - } - - return self::$aspectTypeNameTemplate; - } - - private static function getEntryNameTemplate() - { - if (self::$entryNameTemplate == null) { - self::$entryNameTemplate = new PathTemplate('projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}'); - } - - return self::$entryNameTemplate; - } - - private static function getEntryGroupNameTemplate() - { - if (self::$entryGroupNameTemplate == null) { - self::$entryGroupNameTemplate = new PathTemplate('projects/{project}/locations/{location}/entryGroups/{entry_group}'); - } - - return self::$entryGroupNameTemplate; - } - - private static function getEntryTypeNameTemplate() - { - if (self::$entryTypeNameTemplate == null) { - self::$entryTypeNameTemplate = new PathTemplate('projects/{project}/locations/{location}/entryTypes/{entry_type}'); - } - - return self::$entryTypeNameTemplate; - } - - private static function getLocationNameTemplate() - { - if (self::$locationNameTemplate == null) { - self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); - } - - return self::$locationNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'aspectType' => self::getAspectTypeNameTemplate(), - 'entry' => self::getEntryNameTemplate(), - 'entryGroup' => self::getEntryGroupNameTemplate(), - 'entryType' => self::getEntryTypeNameTemplate(), - 'location' => self::getLocationNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a aspect_type - * resource. - * - * @param string $project - * @param string $location - * @param string $aspectType - * - * @return string The formatted aspect_type resource. - */ - public static function aspectTypeName($project, $location, $aspectType) - { - return self::getAspectTypeNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'aspect_type' => $aspectType, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a entry - * resource. - * - * @param string $project - * @param string $location - * @param string $entryGroup - * @param string $entry - * - * @return string The formatted entry resource. - */ - public static function entryName($project, $location, $entryGroup, $entry) - { - return self::getEntryNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'entry_group' => $entryGroup, - 'entry' => $entry, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a entry_group - * resource. - * - * @param string $project - * @param string $location - * @param string $entryGroup - * - * @return string The formatted entry_group resource. - */ - public static function entryGroupName($project, $location, $entryGroup) - { - return self::getEntryGroupNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'entry_group' => $entryGroup, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a entry_type - * resource. - * - * @param string $project - * @param string $location - * @param string $entryType - * - * @return string The formatted entry_type resource. - */ - public static function entryTypeName($project, $location, $entryType) - { - return self::getEntryTypeNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'entry_type' => $entryType, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a location - * resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted location resource. - */ - public static function locationName($project, $location) - { - return self::getLocationNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - aspectType: projects/{project}/locations/{location}/aspectTypes/{aspect_type} - * - entry: projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry} - * - entryGroup: projects/{project}/locations/{location}/entryGroups/{entry_group} - * - entryType: projects/{project}/locations/{location}/entryTypes/{entry_type} - * - location: projects/{project}/locations/{location} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName($formattedName, $template = null) - { - $templateMap = self::getPathTemplateMap(); - if ($template) { - if (!isset($templateMap[$template])) { - throw new ValidationException("Template name $template does not exist"); - } - - return $templateMap[$template]->match($formattedName); - } - - foreach ($templateMap as $templateName => $pathTemplate) { - try { - return $pathTemplate->match($formattedName); - } catch (ValidationException $ex) { - // Swallow the exception to continue trying other path templates - } - } - - throw new ValidationException("Input did not match any known format. Input: $formattedName"); - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'dataplex.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** - * Creates an AspectType - * - * Sample code: - * ``` - * $catalogServiceClient = new CatalogServiceClient(); - * try { - * $formattedParent = $catalogServiceClient->locationName('[PROJECT]', '[LOCATION]'); - * $aspectTypeId = 'aspect_type_id'; - * $aspectType = new AspectType(); - * $operationResponse = $catalogServiceClient->createAspectType($formattedParent, $aspectTypeId, $aspectType); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $catalogServiceClient->createAspectType($formattedParent, $aspectTypeId, $aspectType); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $catalogServiceClient->resumeOperation($operationName, 'createAspectType'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $catalogServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the AspectType, of the form: - * projects/{project_number}/locations/{location_id} - * where `location_id` refers to a GCP region. - * @param string $aspectTypeId Required. AspectType identifier. - * @param AspectType $aspectType Required. AspectType Resource - * @param array $optionalArgs { - * Optional. - * - * @type bool $validateOnly - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function createAspectType($parent, $aspectTypeId, $aspectType, array $optionalArgs = []) - { - $request = new CreateAspectTypeRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setAspectTypeId($aspectTypeId); - $request->setAspectType($aspectType); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['validateOnly'])) { - $request->setValidateOnly($optionalArgs['validateOnly']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CreateAspectType', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Creates an Entry. - * - * Sample code: - * ``` - * $catalogServiceClient = new CatalogServiceClient(); - * try { - * $formattedParent = $catalogServiceClient->entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); - * $entryId = 'entry_id'; - * $entry = new Entry(); - * $response = $catalogServiceClient->createEntry($formattedParent, $entryId, $entry); - * } finally { - * $catalogServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the parent Entry Group: - * `projects/{project}/locations/{location}/entryGroups/{entry_group}`. - * @param string $entryId Required. Entry identifier. It has to be unique within an Entry Group. - * - * Entries corresponding to Google Cloud resources use Entry ID format based - * on Full Resource Names - * (https://cloud.google.com/apis/design/resource_names#full_resource_name). - * The format is a Full Resource Name of the resource without the - * prefix double slashes in the API Service Name part of Full Resource Name. - * This allows retrieval of entries using their associated resource name. - * - * For example if the Full Resource Name of a resource is - * `//library.googleapis.com/shelves/shelf1/books/book2`, - * then the suggested entry_id is - * `library.googleapis.com/shelves/shelf1/books/book2`. - * - * It is also suggested to follow the same convention for entries - * corresponding to resources from other providers or systems than Google - * Cloud. - * - * The maximum size of the field is 4000 characters. - * @param Entry $entry Required. Entry resource. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Dataplex\V1\Entry - * - * @throws ApiException if the remote call fails - */ - public function createEntry($parent, $entryId, $entry, array $optionalArgs = []) - { - $request = new CreateEntryRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setEntryId($entryId); - $request->setEntry($entry); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateEntry', Entry::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates an EntryGroup - * - * Sample code: - * ``` - * $catalogServiceClient = new CatalogServiceClient(); - * try { - * $formattedParent = $catalogServiceClient->locationName('[PROJECT]', '[LOCATION]'); - * $entryGroupId = 'entry_group_id'; - * $entryGroup = new EntryGroup(); - * $operationResponse = $catalogServiceClient->createEntryGroup($formattedParent, $entryGroupId, $entryGroup); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $catalogServiceClient->createEntryGroup($formattedParent, $entryGroupId, $entryGroup); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $catalogServiceClient->resumeOperation($operationName, 'createEntryGroup'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $catalogServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the entryGroup, of the form: - * projects/{project_number}/locations/{location_id} - * where `location_id` refers to a GCP region. - * @param string $entryGroupId Required. EntryGroup identifier. - * @param EntryGroup $entryGroup Required. EntryGroup Resource - * @param array $optionalArgs { - * Optional. - * - * @type bool $validateOnly - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function createEntryGroup($parent, $entryGroupId, $entryGroup, array $optionalArgs = []) - { - $request = new CreateEntryGroupRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setEntryGroupId($entryGroupId); - $request->setEntryGroup($entryGroup); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['validateOnly'])) { - $request->setValidateOnly($optionalArgs['validateOnly']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CreateEntryGroup', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Creates an EntryType - * - * Sample code: - * ``` - * $catalogServiceClient = new CatalogServiceClient(); - * try { - * $formattedParent = $catalogServiceClient->locationName('[PROJECT]', '[LOCATION]'); - * $entryTypeId = 'entry_type_id'; - * $entryType = new EntryType(); - * $operationResponse = $catalogServiceClient->createEntryType($formattedParent, $entryTypeId, $entryType); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $catalogServiceClient->createEntryType($formattedParent, $entryTypeId, $entryType); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $catalogServiceClient->resumeOperation($operationName, 'createEntryType'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $catalogServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the EntryType, of the form: - * projects/{project_number}/locations/{location_id} - * where `location_id` refers to a GCP region. - * @param string $entryTypeId Required. EntryType identifier. - * @param EntryType $entryType Required. EntryType Resource - * @param array $optionalArgs { - * Optional. - * - * @type bool $validateOnly - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function createEntryType($parent, $entryTypeId, $entryType, array $optionalArgs = []) - { - $request = new CreateEntryTypeRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setEntryTypeId($entryTypeId); - $request->setEntryType($entryType); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['validateOnly'])) { - $request->setValidateOnly($optionalArgs['validateOnly']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CreateEntryType', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Deletes a AspectType resource. - * - * Sample code: - * ``` - * $catalogServiceClient = new CatalogServiceClient(); - * try { - * $formattedName = $catalogServiceClient->aspectTypeName('[PROJECT]', '[LOCATION]', '[ASPECT_TYPE]'); - * $operationResponse = $catalogServiceClient->deleteAspectType($formattedName); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $catalogServiceClient->deleteAspectType($formattedName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $catalogServiceClient->resumeOperation($operationName, 'deleteAspectType'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $catalogServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the AspectType: - * `projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}`. - * @param array $optionalArgs { - * Optional. - * - * @type string $etag - * Optional. If the client provided etag value does not match the current etag - * value, the DeleteAspectTypeRequest method returns an ABORTED error response - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function deleteAspectType($name, array $optionalArgs = []) - { - $request = new DeleteAspectTypeRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['etag'])) { - $request->setEtag($optionalArgs['etag']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('DeleteAspectType', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Deletes an Entry. - * - * Sample code: - * ``` - * $catalogServiceClient = new CatalogServiceClient(); - * try { - * $formattedName = $catalogServiceClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); - * $response = $catalogServiceClient->deleteEntry($formattedName); - * } finally { - * $catalogServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the Entry: - * `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Dataplex\V1\Entry - * - * @throws ApiException if the remote call fails - */ - public function deleteEntry($name, array $optionalArgs = []) - { - $request = new DeleteEntryRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteEntry', Entry::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes a EntryGroup resource. - * - * Sample code: - * ``` - * $catalogServiceClient = new CatalogServiceClient(); - * try { - * $formattedName = $catalogServiceClient->entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); - * $operationResponse = $catalogServiceClient->deleteEntryGroup($formattedName); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $catalogServiceClient->deleteEntryGroup($formattedName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $catalogServiceClient->resumeOperation($operationName, 'deleteEntryGroup'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $catalogServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the EntryGroup: - * `projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}`. - * @param array $optionalArgs { - * Optional. - * - * @type string $etag - * Optional. If the client provided etag value does not match the current etag - * value, the DeleteEntryGroupRequest method returns an ABORTED error response - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function deleteEntryGroup($name, array $optionalArgs = []) - { - $request = new DeleteEntryGroupRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['etag'])) { - $request->setEtag($optionalArgs['etag']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('DeleteEntryGroup', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Deletes a EntryType resource. - * - * Sample code: - * ``` - * $catalogServiceClient = new CatalogServiceClient(); - * try { - * $formattedName = $catalogServiceClient->entryTypeName('[PROJECT]', '[LOCATION]', '[ENTRY_TYPE]'); - * $operationResponse = $catalogServiceClient->deleteEntryType($formattedName); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $catalogServiceClient->deleteEntryType($formattedName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $catalogServiceClient->resumeOperation($operationName, 'deleteEntryType'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $catalogServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the EntryType: - * `projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}`. - * @param array $optionalArgs { - * Optional. - * - * @type string $etag - * Optional. If the client provided etag value does not match the current etag - * value, the DeleteEntryTypeRequest method returns an ABORTED error response - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function deleteEntryType($name, array $optionalArgs = []) - { - $request = new DeleteEntryTypeRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['etag'])) { - $request->setEtag($optionalArgs['etag']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('DeleteEntryType', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Retrieves a AspectType resource. - * - * Sample code: - * ``` - * $catalogServiceClient = new CatalogServiceClient(); - * try { - * $formattedName = $catalogServiceClient->aspectTypeName('[PROJECT]', '[LOCATION]', '[ASPECT_TYPE]'); - * $response = $catalogServiceClient->getAspectType($formattedName); - * } finally { - * $catalogServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the AspectType: - * `projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}`. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Dataplex\V1\AspectType - * - * @throws ApiException if the remote call fails - */ - public function getAspectType($name, array $optionalArgs = []) - { - $request = new GetAspectTypeRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetAspectType', AspectType::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets a single entry. - * - * Sample code: - * ``` - * $catalogServiceClient = new CatalogServiceClient(); - * try { - * $formattedName = $catalogServiceClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); - * $response = $catalogServiceClient->getEntry($formattedName); - * } finally { - * $catalogServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the Entry: - * `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. - * @param array $optionalArgs { - * Optional. - * - * @type int $view - * Optional. View for controlling which parts of an entry are to be returned. - * For allowed values, use constants defined on {@see \Google\Cloud\Dataplex\V1\EntryView} - * @type string[] $aspectTypes - * Optional. Limits the aspects returned to the provided aspect types. - * Only works if the CUSTOM view is selected. - * @type string[] $paths - * Optional. Limits the aspects returned to those associated with the provided - * paths within the Entry. Only works if the CUSTOM view is selected. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Dataplex\V1\Entry - * - * @throws ApiException if the remote call fails - */ - public function getEntry($name, array $optionalArgs = []) - { - $request = new GetEntryRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['view'])) { - $request->setView($optionalArgs['view']); - } - - if (isset($optionalArgs['aspectTypes'])) { - $request->setAspectTypes($optionalArgs['aspectTypes']); - } - - if (isset($optionalArgs['paths'])) { - $request->setPaths($optionalArgs['paths']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetEntry', Entry::class, $optionalArgs, $request)->wait(); - } - - /** - * Retrieves a EntryGroup resource. - * - * Sample code: - * ``` - * $catalogServiceClient = new CatalogServiceClient(); - * try { - * $formattedName = $catalogServiceClient->entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); - * $response = $catalogServiceClient->getEntryGroup($formattedName); - * } finally { - * $catalogServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the EntryGroup: - * `projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}`. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Dataplex\V1\EntryGroup - * - * @throws ApiException if the remote call fails - */ - public function getEntryGroup($name, array $optionalArgs = []) - { - $request = new GetEntryGroupRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetEntryGroup', EntryGroup::class, $optionalArgs, $request)->wait(); - } - - /** - * Retrieves a EntryType resource. - * - * Sample code: - * ``` - * $catalogServiceClient = new CatalogServiceClient(); - * try { - * $formattedName = $catalogServiceClient->entryTypeName('[PROJECT]', '[LOCATION]', '[ENTRY_TYPE]'); - * $response = $catalogServiceClient->getEntryType($formattedName); - * } finally { - * $catalogServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the EntryType: - * `projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}`. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Dataplex\V1\EntryType - * - * @throws ApiException if the remote call fails - */ - public function getEntryType($name, array $optionalArgs = []) - { - $request = new GetEntryTypeRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetEntryType', EntryType::class, $optionalArgs, $request)->wait(); - } - - /** - * Lists AspectType resources in a project and location. - * - * Sample code: - * ``` - * $catalogServiceClient = new CatalogServiceClient(); - * try { - * $formattedParent = $catalogServiceClient->locationName('[PROJECT]', '[LOCATION]'); - * // Iterate over pages of elements - * $pagedResponse = $catalogServiceClient->listAspectTypes($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $catalogServiceClient->listAspectTypes($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $catalogServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the AspectType location, of the form: - * `projects/{project_number}/locations/{location_id}` - * where `location_id` refers to a GCP region. - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type string $filter - * Optional. Filter request. Filters are case-sensitive. - * The following formats are supported: - * - * labels.key1 = "value1" - * labels:key1 - * name = "value" - * These restrictions can be coinjoined with AND, OR and NOT conjunctions. - * @type string $orderBy - * Optional. Order by fields (`name` or `create_time`) for the result. - * If not specified, the ordering is undefined. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listAspectTypes($parent, array $optionalArgs = []) - { - $request = new ListAspectTypesRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['orderBy'])) { - $request->setOrderBy($optionalArgs['orderBy']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListAspectTypes', $optionalArgs, ListAspectTypesResponse::class, $request); - } - - /** - * Lists entries within an entry group. - * - * Sample code: - * ``` - * $catalogServiceClient = new CatalogServiceClient(); - * try { - * $formattedParent = $catalogServiceClient->entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); - * // Iterate over pages of elements - * $pagedResponse = $catalogServiceClient->listEntries($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $catalogServiceClient->listEntries($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $catalogServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the parent Entry Group: - * `projects/{project}/locations/{location}/entryGroups/{entry_group}`. - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type string $filter - * Optional. A filter on the entries to return. - * Filters are case-sensitive. - * The request can be filtered by the following fields: - * entry_type, entry_source.display_name. - * The comparison operators are =, !=, <, >, <=, >= (strings are compared - * according to lexical order) - * The logical operators AND, OR, NOT can be used - * in the filter. Wildcard "*" can be used, but for entry_type the full - * project id or number needs to be provided. Example filter expressions: - * "entry_source.display_name=AnExampleDisplayName" - * "entry_type=projects/example-project/locations/global/entryTypes/example-entry_type" - * "entry_type=projects/example-project/locations/us/entryTypes/a* OR - * entry_type=projects/another-project/locations/*" - * "NOT entry_source.display_name=AnotherExampleDisplayName" - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listEntries($parent, array $optionalArgs = []) - { - $request = new ListEntriesRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListEntries', $optionalArgs, ListEntriesResponse::class, $request); - } - - /** - * Lists EntryGroup resources in a project and location. - * - * Sample code: - * ``` - * $catalogServiceClient = new CatalogServiceClient(); - * try { - * $formattedParent = $catalogServiceClient->locationName('[PROJECT]', '[LOCATION]'); - * // Iterate over pages of elements - * $pagedResponse = $catalogServiceClient->listEntryGroups($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $catalogServiceClient->listEntryGroups($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $catalogServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the entryGroup location, of the form: - * `projects/{project_number}/locations/{location_id}` - * where `location_id` refers to a GCP region. - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type string $filter - * Optional. Filter request. - * @type string $orderBy - * Optional. Order by fields for the result. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listEntryGroups($parent, array $optionalArgs = []) - { - $request = new ListEntryGroupsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['orderBy'])) { - $request->setOrderBy($optionalArgs['orderBy']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListEntryGroups', $optionalArgs, ListEntryGroupsResponse::class, $request); - } - - /** - * Lists EntryType resources in a project and location. - * - * Sample code: - * ``` - * $catalogServiceClient = new CatalogServiceClient(); - * try { - * $formattedParent = $catalogServiceClient->locationName('[PROJECT]', '[LOCATION]'); - * // Iterate over pages of elements - * $pagedResponse = $catalogServiceClient->listEntryTypes($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $catalogServiceClient->listEntryTypes($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $catalogServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the EntryType location, of the form: - * `projects/{project_number}/locations/{location_id}` - * where `location_id` refers to a GCP region. - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type string $filter - * Optional. Filter request. Filters are case-sensitive. - * The following formats are supported: - * - * labels.key1 = "value1" - * labels:key1 - * name = "value" - * These restrictions can be coinjoined with AND, OR and NOT conjunctions. - * @type string $orderBy - * Optional. Order by fields (`name` or `create_time`) for the result. - * If not specified, the ordering is undefined. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listEntryTypes($parent, array $optionalArgs = []) - { - $request = new ListEntryTypesRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['orderBy'])) { - $request->setOrderBy($optionalArgs['orderBy']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListEntryTypes', $optionalArgs, ListEntryTypesResponse::class, $request); - } - - /** - * Looks up a single entry. - * - * Sample code: - * ``` - * $catalogServiceClient = new CatalogServiceClient(); - * try { - * $name = 'name'; - * $formattedEntry = $catalogServiceClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); - * $response = $catalogServiceClient->lookupEntry($name, $formattedEntry); - * } finally { - * $catalogServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The project to which the request should be attributed in the - * following form: `projects/{project}/locations/{location}`. - * @param string $entry Required. The resource name of the Entry: - * `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`. - * @param array $optionalArgs { - * Optional. - * - * @type int $view - * Optional. View for controlling which parts of an entry are to be returned. - * For allowed values, use constants defined on {@see \Google\Cloud\Dataplex\V1\EntryView} - * @type string[] $aspectTypes - * Optional. Limits the aspects returned to the provided aspect types. - * Only works if the CUSTOM view is selected. - * @type string[] $paths - * Optional. Limits the aspects returned to those associated with the provided - * paths within the Entry. Only works if the CUSTOM view is selected. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Dataplex\V1\Entry - * - * @throws ApiException if the remote call fails - */ - public function lookupEntry($name, $entry, array $optionalArgs = []) - { - $request = new LookupEntryRequest(); - $requestParamHeaders = []; - $request->setName($name); - $request->setEntry($entry); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['view'])) { - $request->setView($optionalArgs['view']); - } - - if (isset($optionalArgs['aspectTypes'])) { - $request->setAspectTypes($optionalArgs['aspectTypes']); - } - - if (isset($optionalArgs['paths'])) { - $request->setPaths($optionalArgs['paths']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('LookupEntry', Entry::class, $optionalArgs, $request)->wait(); - } - - /** - * Searches for entries matching given query and scope. - * - * Sample code: - * ``` - * $catalogServiceClient = new CatalogServiceClient(); - * try { - * $name = 'name'; - * $query = 'query'; - * // Iterate over pages of elements - * $pagedResponse = $catalogServiceClient->searchEntries($name, $query); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $catalogServiceClient->searchEntries($name, $query); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $catalogServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The project to which the request should be attributed in the - * following form: `projects/{project}/locations/{location}`. - * @param string $query Required. The query against which entries in scope should be matched. - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type string $orderBy - * Optional. Ordering of the results. Supported options to be added later. - * @type string $scope - * Optional. The scope under which the search should be operating. Should - * either be organizations/ or projects/. If left - * unspecified, it will default to the organization where the project provided - * in `name` is located. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function searchEntries($name, $query, array $optionalArgs = []) - { - $request = new SearchEntriesRequest(); - $requestParamHeaders = []; - $request->setName($name); - $request->setQuery($query); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['orderBy'])) { - $request->setOrderBy($optionalArgs['orderBy']); - } - - if (isset($optionalArgs['scope'])) { - $request->setScope($optionalArgs['scope']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('SearchEntries', $optionalArgs, SearchEntriesResponse::class, $request); - } - - /** - * Updates a AspectType resource. - * - * Sample code: - * ``` - * $catalogServiceClient = new CatalogServiceClient(); - * try { - * $aspectType = new AspectType(); - * $updateMask = new FieldMask(); - * $operationResponse = $catalogServiceClient->updateAspectType($aspectType, $updateMask); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $catalogServiceClient->updateAspectType($aspectType, $updateMask); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $catalogServiceClient->resumeOperation($operationName, 'updateAspectType'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $catalogServiceClient->close(); - * } - * ``` - * - * @param AspectType $aspectType Required. AspectType Resource - * @param FieldMask $updateMask Required. Mask of fields to update. - * @param array $optionalArgs { - * Optional. - * - * @type bool $validateOnly - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function updateAspectType($aspectType, $updateMask, array $optionalArgs = []) - { - $request = new UpdateAspectTypeRequest(); - $requestParamHeaders = []; - $request->setAspectType($aspectType); - $request->setUpdateMask($updateMask); - $requestParamHeaders['aspect_type.name'] = $aspectType->getName(); - if (isset($optionalArgs['validateOnly'])) { - $request->setValidateOnly($optionalArgs['validateOnly']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('UpdateAspectType', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Updates an Entry. - * - * Sample code: - * ``` - * $catalogServiceClient = new CatalogServiceClient(); - * try { - * $entry = new Entry(); - * $response = $catalogServiceClient->updateEntry($entry); - * } finally { - * $catalogServiceClient->close(); - * } - * ``` - * - * @param Entry $entry Required. Entry resource. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * Optional. Mask of fields to update. To update Aspects, the update_mask must - * contain the value "aspects". - * - * If the update_mask is empty, all modifiable fields present in the request - * will be updated. - * @type bool $allowMissing - * Optional. If set to true and the entry does not exist, it will be created. - * @type bool $deleteMissingAspects - * Optional. If set to true and the aspect_keys specify aspect ranges, any - * existing aspects from that range not provided in the request will be - * deleted. - * @type string[] $aspectKeys - * Optional. The map keys of the Aspects which should be modified. Supports - * the following syntaxes: - * * - matches aspect on given type and empty path - * * @path - matches aspect on given type and specified - * path - * * * - matches aspects on given type for all paths - * * *@path - matches aspects of all types on the given path - * - * Existing aspects matching the syntax will not be removed unless - * `delete_missing_aspects` is set to true. - * - * If this field is left empty, it will be treated as specifying exactly those - * Aspects present in the request. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Dataplex\V1\Entry - * - * @throws ApiException if the remote call fails - */ - public function updateEntry($entry, array $optionalArgs = []) - { - $request = new UpdateEntryRequest(); - $requestParamHeaders = []; - $request->setEntry($entry); - $requestParamHeaders['entry.name'] = $entry->getName(); - if (isset($optionalArgs['updateMask'])) { - $request->setUpdateMask($optionalArgs['updateMask']); - } - - if (isset($optionalArgs['allowMissing'])) { - $request->setAllowMissing($optionalArgs['allowMissing']); - } - - if (isset($optionalArgs['deleteMissingAspects'])) { - $request->setDeleteMissingAspects($optionalArgs['deleteMissingAspects']); - } - - if (isset($optionalArgs['aspectKeys'])) { - $request->setAspectKeys($optionalArgs['aspectKeys']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateEntry', Entry::class, $optionalArgs, $request)->wait(); - } - - /** - * Updates a EntryGroup resource. - * - * Sample code: - * ``` - * $catalogServiceClient = new CatalogServiceClient(); - * try { - * $entryGroup = new EntryGroup(); - * $updateMask = new FieldMask(); - * $operationResponse = $catalogServiceClient->updateEntryGroup($entryGroup, $updateMask); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $catalogServiceClient->updateEntryGroup($entryGroup, $updateMask); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $catalogServiceClient->resumeOperation($operationName, 'updateEntryGroup'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $catalogServiceClient->close(); - * } - * ``` - * - * @param EntryGroup $entryGroup Required. EntryGroup Resource - * @param FieldMask $updateMask Required. Mask of fields to update. - * @param array $optionalArgs { - * Optional. - * - * @type bool $validateOnly - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function updateEntryGroup($entryGroup, $updateMask, array $optionalArgs = []) - { - $request = new UpdateEntryGroupRequest(); - $requestParamHeaders = []; - $request->setEntryGroup($entryGroup); - $request->setUpdateMask($updateMask); - $requestParamHeaders['entry_group.name'] = $entryGroup->getName(); - if (isset($optionalArgs['validateOnly'])) { - $request->setValidateOnly($optionalArgs['validateOnly']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('UpdateEntryGroup', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Updates a EntryType resource. - * - * Sample code: - * ``` - * $catalogServiceClient = new CatalogServiceClient(); - * try { - * $entryType = new EntryType(); - * $updateMask = new FieldMask(); - * $operationResponse = $catalogServiceClient->updateEntryType($entryType, $updateMask); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $catalogServiceClient->updateEntryType($entryType, $updateMask); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $catalogServiceClient->resumeOperation($operationName, 'updateEntryType'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $catalogServiceClient->close(); - * } - * ``` - * - * @param EntryType $entryType Required. EntryType Resource - * @param FieldMask $updateMask Required. Mask of fields to update. - * @param array $optionalArgs { - * Optional. - * - * @type bool $validateOnly - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function updateEntryType($entryType, $updateMask, array $optionalArgs = []) - { - $request = new UpdateEntryTypeRequest(); - $requestParamHeaders = []; - $request->setEntryType($entryType); - $request->setUpdateMask($updateMask); - $requestParamHeaders['entry_type.name'] = $entryType->getName(); - if (isset($optionalArgs['validateOnly'])) { - $request->setValidateOnly($optionalArgs['validateOnly']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('UpdateEntryType', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Gets the access control policy for a resource. Returns an empty policy - if the resource exists and does not have a policy set. - * - * Sample code: - * ``` - * $catalogServiceClient = new CatalogServiceClient(); - * try { - * $resource = 'resource'; - * $response = $catalogServiceClient->getIamPolicy($resource); - * } finally { - * $catalogServiceClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy is being requested. - * See the operation documentation for the appropriate value for this field. - * @param array $optionalArgs { - * Optional. - * - * @type GetPolicyOptions $options - * OPTIONAL: A `GetPolicyOptions` object for specifying options to - * `GetIamPolicy`. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Iam\V1\Policy - * - * @throws ApiException if the remote call fails - */ - public function getIamPolicy($resource, array $optionalArgs = []) - { - $request = new GetIamPolicyRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $requestParamHeaders['resource'] = $resource; - if (isset($optionalArgs['options'])) { - $request->setOptions($optionalArgs['options']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetIamPolicy', Policy::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait(); - } - - /** - * Sets the access control policy on the specified resource. Replaces - any existing policy. - - Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` - errors. - * - * Sample code: - * ``` - * $catalogServiceClient = new CatalogServiceClient(); - * try { - * $resource = 'resource'; - * $policy = new Policy(); - * $response = $catalogServiceClient->setIamPolicy($resource, $policy); - * } finally { - * $catalogServiceClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy is being specified. - * See the operation documentation for the appropriate value for this field. - * @param Policy $policy REQUIRED: The complete policy to be applied to the `resource`. The size of - * the policy is limited to a few 10s of KB. An empty policy is a - * valid policy but certain Cloud Platform services (such as Projects) - * might reject them. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - * the fields in the mask will be modified. If no mask is provided, the - * following default mask is used: - * - * `paths: "bindings, etag"` - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Iam\V1\Policy - * - * @throws ApiException if the remote call fails - */ - public function setIamPolicy($resource, $policy, array $optionalArgs = []) - { - $request = new SetIamPolicyRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $request->setPolicy($policy); - $requestParamHeaders['resource'] = $resource; - if (isset($optionalArgs['updateMask'])) { - $request->setUpdateMask($optionalArgs['updateMask']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('SetIamPolicy', Policy::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait(); - } - - /** - * Returns permissions that a caller has on the specified resource. If the - resource does not exist, this will return an empty set of - permissions, not a `NOT_FOUND` error. - - Note: This operation is designed to be used for building - permission-aware UIs and command-line tools, not for authorization - checking. This operation may "fail open" without warning. - * - * Sample code: - * ``` - * $catalogServiceClient = new CatalogServiceClient(); - * try { - * $resource = 'resource'; - * $permissions = []; - * $response = $catalogServiceClient->testIamPermissions($resource, $permissions); - * } finally { - * $catalogServiceClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy detail is being requested. - * See the operation documentation for the appropriate value for this field. - * @param string[] $permissions The set of permissions to check for the `resource`. Permissions with - * wildcards (such as '*' or 'storage.*') are not allowed. For more - * information see - * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Iam\V1\TestIamPermissionsResponse - * - * @throws ApiException if the remote call fails - */ - public function testIamPermissions($resource, $permissions, array $optionalArgs = []) - { - $request = new TestIamPermissionsRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $request->setPermissions($permissions); - $requestParamHeaders['resource'] = $resource; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('TestIamPermissions', TestIamPermissionsResponse::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait(); - } - - /** - * Gets information about a location. - * - * Sample code: - * ``` - * $catalogServiceClient = new CatalogServiceClient(); - * try { - * $response = $catalogServiceClient->getLocation(); - * } finally { - * $catalogServiceClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * Resource name for the location. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Location\Location - * - * @throws ApiException if the remote call fails - */ - public function getLocation(array $optionalArgs = []) - { - $request = new GetLocationRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - $requestParamHeaders['name'] = $optionalArgs['name']; - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetLocation', Location::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.cloud.location.Locations')->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * Sample code: - * ``` - * $catalogServiceClient = new CatalogServiceClient(); - * try { - * // Iterate over pages of elements - * $pagedResponse = $catalogServiceClient->listLocations(); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $catalogServiceClient->listLocations(); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $catalogServiceClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * The resource that owns the locations collection, if applicable. - * @type string $filter - * The standard list filter. - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listLocations(array $optionalArgs = []) - { - $request = new ListLocationsRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - $requestParamHeaders['name'] = $optionalArgs['name']; - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListLocations', $optionalArgs, ListLocationsResponse::class, $request, 'google.cloud.location.Locations'); - } -} diff --git a/owl-bot-staging/Dataplex/v1/src/V1/Gapic/ContentServiceGapicClient.php b/owl-bot-staging/Dataplex/v1/src/V1/Gapic/ContentServiceGapicClient.php deleted file mode 100644 index 47cbd0ce7a73..000000000000 --- a/owl-bot-staging/Dataplex/v1/src/V1/Gapic/ContentServiceGapicClient.php +++ /dev/null @@ -1,859 +0,0 @@ -lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - * $content = new Content(); - * $response = $contentServiceClient->createContent($formattedParent, $content); - * } finally { - * $contentServiceClient->close(); - * } - * ``` - * - * Many parameters require resource names to be formatted in a particular way. To - * assist with these names, this class includes a format method for each type of - * name, and additionally a parseName method to extract the individual identifiers - * contained within formatted names that are returned by the API. - * - * @deprecated Please use the new service client {@see \Google\Cloud\Dataplex\V1\Client\ContentServiceClient}. - */ -class ContentServiceGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.dataplex.v1.ContentService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - const SERVICE_ADDRESS = 'dataplex.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'dataplex.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private static $contentNameTemplate; - - private static $lakeNameTemplate; - - private static $pathTemplateMap; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/content_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/content_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/content_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/content_service_rest_client_config.php', - ], - ], - ]; - } - - private static function getContentNameTemplate() - { - if (self::$contentNameTemplate == null) { - self::$contentNameTemplate = new PathTemplate('projects/{project}/locations/{location}/lakes/{lake}/content/{content}'); - } - - return self::$contentNameTemplate; - } - - private static function getLakeNameTemplate() - { - if (self::$lakeNameTemplate == null) { - self::$lakeNameTemplate = new PathTemplate('projects/{project}/locations/{location}/lakes/{lake}'); - } - - return self::$lakeNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'content' => self::getContentNameTemplate(), - 'lake' => self::getLakeNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a content - * resource. - * - * @param string $project - * @param string $location - * @param string $lake - * @param string $content - * - * @return string The formatted content resource. - */ - public static function contentName($project, $location, $lake, $content) - { - return self::getContentNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'lake' => $lake, - 'content' => $content, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a lake - * resource. - * - * @param string $project - * @param string $location - * @param string $lake - * - * @return string The formatted lake resource. - */ - public static function lakeName($project, $location, $lake) - { - return self::getLakeNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'lake' => $lake, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - content: projects/{project}/locations/{location}/lakes/{lake}/content/{content} - * - lake: projects/{project}/locations/{location}/lakes/{lake} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName($formattedName, $template = null) - { - $templateMap = self::getPathTemplateMap(); - if ($template) { - if (!isset($templateMap[$template])) { - throw new ValidationException("Template name $template does not exist"); - } - - return $templateMap[$template]->match($formattedName); - } - - foreach ($templateMap as $templateName => $pathTemplate) { - try { - return $pathTemplate->match($formattedName); - } catch (ValidationException $ex) { - // Swallow the exception to continue trying other path templates - } - } - - throw new ValidationException("Input did not match any known format. Input: $formattedName"); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'dataplex.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** - * Create a content. - * - * Sample code: - * ``` - * $contentServiceClient = new ContentServiceClient(); - * try { - * $formattedParent = $contentServiceClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - * $content = new Content(); - * $response = $contentServiceClient->createContent($formattedParent, $content); - * } finally { - * $contentServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the parent lake: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id} - * @param Content $content Required. Content resource. - * @param array $optionalArgs { - * Optional. - * - * @type bool $validateOnly - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Dataplex\V1\Content - * - * @throws ApiException if the remote call fails - */ - public function createContent($parent, $content, array $optionalArgs = []) - { - $request = new CreateContentRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setContent($content); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['validateOnly'])) { - $request->setValidateOnly($optionalArgs['validateOnly']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateContent', Content::class, $optionalArgs, $request)->wait(); - } - - /** - * Delete a content. - * - * Sample code: - * ``` - * $contentServiceClient = new ContentServiceClient(); - * try { - * $formattedName = $contentServiceClient->contentName('[PROJECT]', '[LOCATION]', '[LAKE]', '[CONTENT]'); - * $contentServiceClient->deleteContent($formattedName); - * } finally { - * $contentServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the content: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id} - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - */ - public function deleteContent($name, array $optionalArgs = []) - { - $request = new DeleteContentRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteContent', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Get a content resource. - * - * Sample code: - * ``` - * $contentServiceClient = new ContentServiceClient(); - * try { - * $formattedName = $contentServiceClient->contentName('[PROJECT]', '[LOCATION]', '[LAKE]', '[CONTENT]'); - * $response = $contentServiceClient->getContent($formattedName); - * } finally { - * $contentServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the content: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id} - * @param array $optionalArgs { - * Optional. - * - * @type int $view - * Optional. Specify content view to make a partial request. - * For allowed values, use constants defined on {@see \Google\Cloud\Dataplex\V1\GetContentRequest\ContentView} - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Dataplex\V1\Content - * - * @throws ApiException if the remote call fails - */ - public function getContent($name, array $optionalArgs = []) - { - $request = new GetContentRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['view'])) { - $request->setView($optionalArgs['view']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetContent', Content::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets the access control policy for a contentitem resource. A `NOT_FOUND` - * error is returned if the resource does not exist. An empty policy is - * returned if the resource exists but does not have a policy set on it. - * - * Caller must have Google IAM `dataplex.content.getIamPolicy` permission - * on the resource. - * - * Sample code: - * ``` - * $contentServiceClient = new ContentServiceClient(); - * try { - * $resource = 'resource'; - * $response = $contentServiceClient->getIamPolicy($resource); - * } finally { - * $contentServiceClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy is being requested. - * See the operation documentation for the appropriate value for this field. - * @param array $optionalArgs { - * Optional. - * - * @type GetPolicyOptions $options - * OPTIONAL: A `GetPolicyOptions` object for specifying options to - * `GetIamPolicy`. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Iam\V1\Policy - * - * @throws ApiException if the remote call fails - */ - public function getIamPolicy($resource, array $optionalArgs = []) - { - $request = new GetIamPolicyRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $requestParamHeaders['resource'] = $resource; - if (isset($optionalArgs['options'])) { - $request->setOptions($optionalArgs['options']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetIamPolicy', Policy::class, $optionalArgs, $request)->wait(); - } - - /** - * List content. - * - * Sample code: - * ``` - * $contentServiceClient = new ContentServiceClient(); - * try { - * $formattedParent = $contentServiceClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - * // Iterate over pages of elements - * $pagedResponse = $contentServiceClient->listContent($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $contentServiceClient->listContent($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $contentServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the parent lake: - * projects/{project_id}/locations/{location_id}/lakes/{lake_id} - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type string $filter - * Optional. Filter request. Filters are case-sensitive. - * The following formats are supported: - * - * labels.key1 = "value1" - * labels:key1 - * type = "NOTEBOOK" - * type = "SQL_SCRIPT" - * - * These restrictions can be coinjoined with AND, OR and NOT conjunctions. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listContent($parent, array $optionalArgs = []) - { - $request = new ListContentRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListContent', $optionalArgs, ListContentResponse::class, $request); - } - - /** - * Sets the access control policy on the specified contentitem resource. - * Replaces any existing policy. - * - * Caller must have Google IAM `dataplex.content.setIamPolicy` permission - * on the resource. - * - * Sample code: - * ``` - * $contentServiceClient = new ContentServiceClient(); - * try { - * $resource = 'resource'; - * $policy = new Policy(); - * $response = $contentServiceClient->setIamPolicy($resource, $policy); - * } finally { - * $contentServiceClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy is being specified. - * See the operation documentation for the appropriate value for this field. - * @param Policy $policy REQUIRED: The complete policy to be applied to the `resource`. The size of - * the policy is limited to a few 10s of KB. An empty policy is a - * valid policy but certain Cloud Platform services (such as Projects) - * might reject them. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - * the fields in the mask will be modified. If no mask is provided, the - * following default mask is used: - * - * `paths: "bindings, etag"` - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Iam\V1\Policy - * - * @throws ApiException if the remote call fails - */ - public function setIamPolicy($resource, $policy, array $optionalArgs = []) - { - $request = new SetIamPolicyRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $request->setPolicy($policy); - $requestParamHeaders['resource'] = $resource; - if (isset($optionalArgs['updateMask'])) { - $request->setUpdateMask($optionalArgs['updateMask']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('SetIamPolicy', Policy::class, $optionalArgs, $request)->wait(); - } - - /** - * Returns the caller's permissions on a resource. - * If the resource does not exist, an empty set of - * permissions is returned (a `NOT_FOUND` error is not returned). - * - * A caller is not required to have Google IAM permission to make this - * request. - * - * Note: This operation is designed to be used for building permission-aware - * UIs and command-line tools, not for authorization checking. This operation - * may "fail open" without warning. - * - * Sample code: - * ``` - * $contentServiceClient = new ContentServiceClient(); - * try { - * $resource = 'resource'; - * $permissions = []; - * $response = $contentServiceClient->testIamPermissions($resource, $permissions); - * } finally { - * $contentServiceClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy detail is being requested. - * See the operation documentation for the appropriate value for this field. - * @param string[] $permissions The set of permissions to check for the `resource`. Permissions with - * wildcards (such as '*' or 'storage.*') are not allowed. For more - * information see - * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Iam\V1\TestIamPermissionsResponse - * - * @throws ApiException if the remote call fails - */ - public function testIamPermissions($resource, $permissions, array $optionalArgs = []) - { - $request = new TestIamPermissionsRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $request->setPermissions($permissions); - $requestParamHeaders['resource'] = $resource; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('TestIamPermissions', TestIamPermissionsResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Update a content. Only supports full resource update. - * - * Sample code: - * ``` - * $contentServiceClient = new ContentServiceClient(); - * try { - * $updateMask = new FieldMask(); - * $content = new Content(); - * $response = $contentServiceClient->updateContent($updateMask, $content); - * } finally { - * $contentServiceClient->close(); - * } - * ``` - * - * @param FieldMask $updateMask Required. Mask of fields to update. - * @param Content $content Required. Update description. - * Only fields specified in `update_mask` are updated. - * @param array $optionalArgs { - * Optional. - * - * @type bool $validateOnly - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Dataplex\V1\Content - * - * @throws ApiException if the remote call fails - */ - public function updateContent($updateMask, $content, array $optionalArgs = []) - { - $request = new UpdateContentRequest(); - $requestParamHeaders = []; - $request->setUpdateMask($updateMask); - $request->setContent($content); - $requestParamHeaders['content.name'] = $content->getName(); - if (isset($optionalArgs['validateOnly'])) { - $request->setValidateOnly($optionalArgs['validateOnly']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateContent', Content::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets information about a location. - * - * Sample code: - * ``` - * $contentServiceClient = new ContentServiceClient(); - * try { - * $response = $contentServiceClient->getLocation(); - * } finally { - * $contentServiceClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * Resource name for the location. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Location\Location - * - * @throws ApiException if the remote call fails - */ - public function getLocation(array $optionalArgs = []) - { - $request = new GetLocationRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - $requestParamHeaders['name'] = $optionalArgs['name']; - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetLocation', Location::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.cloud.location.Locations')->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * Sample code: - * ``` - * $contentServiceClient = new ContentServiceClient(); - * try { - * // Iterate over pages of elements - * $pagedResponse = $contentServiceClient->listLocations(); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $contentServiceClient->listLocations(); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $contentServiceClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * The resource that owns the locations collection, if applicable. - * @type string $filter - * The standard list filter. - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listLocations(array $optionalArgs = []) - { - $request = new ListLocationsRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - $requestParamHeaders['name'] = $optionalArgs['name']; - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListLocations', $optionalArgs, ListLocationsResponse::class, $request, 'google.cloud.location.Locations'); - } -} diff --git a/owl-bot-staging/Dataplex/v1/src/V1/Gapic/DataScanServiceGapicClient.php b/owl-bot-staging/Dataplex/v1/src/V1/Gapic/DataScanServiceGapicClient.php deleted file mode 100644 index 211f6adeb09a..000000000000 --- a/owl-bot-staging/Dataplex/v1/src/V1/Gapic/DataScanServiceGapicClient.php +++ /dev/null @@ -1,1308 +0,0 @@ -locationName('[PROJECT]', '[LOCATION]'); - * $dataScan = new DataScan(); - * $dataScanId = 'data_scan_id'; - * $operationResponse = $dataScanServiceClient->createDataScan($formattedParent, $dataScan, $dataScanId); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $dataScanServiceClient->createDataScan($formattedParent, $dataScan, $dataScanId); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $dataScanServiceClient->resumeOperation($operationName, 'createDataScan'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $dataScanServiceClient->close(); - * } - * ``` - * - * Many parameters require resource names to be formatted in a particular way. To - * assist with these names, this class includes a format method for each type of - * name, and additionally a parseName method to extract the individual identifiers - * contained within formatted names that are returned by the API. - * - * @deprecated Please use the new service client {@see \Google\Cloud\Dataplex\V1\Client\DataScanServiceClient}. - */ -class DataScanServiceGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.dataplex.v1.DataScanService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - const SERVICE_ADDRESS = 'dataplex.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'dataplex.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private static $dataScanNameTemplate; - - private static $dataScanJobNameTemplate; - - private static $entityNameTemplate; - - private static $locationNameTemplate; - - private static $pathTemplateMap; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/data_scan_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/data_scan_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/data_scan_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/data_scan_service_rest_client_config.php', - ], - ], - ]; - } - - private static function getDataScanNameTemplate() - { - if (self::$dataScanNameTemplate == null) { - self::$dataScanNameTemplate = new PathTemplate('projects/{project}/locations/{location}/dataScans/{dataScan}'); - } - - return self::$dataScanNameTemplate; - } - - private static function getDataScanJobNameTemplate() - { - if (self::$dataScanJobNameTemplate == null) { - self::$dataScanJobNameTemplate = new PathTemplate('projects/{project}/locations/{location}/dataScans/{dataScan}/jobs/{job}'); - } - - return self::$dataScanJobNameTemplate; - } - - private static function getEntityNameTemplate() - { - if (self::$entityNameTemplate == null) { - self::$entityNameTemplate = new PathTemplate('projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}'); - } - - return self::$entityNameTemplate; - } - - private static function getLocationNameTemplate() - { - if (self::$locationNameTemplate == null) { - self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); - } - - return self::$locationNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'dataScan' => self::getDataScanNameTemplate(), - 'dataScanJob' => self::getDataScanJobNameTemplate(), - 'entity' => self::getEntityNameTemplate(), - 'location' => self::getLocationNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a data_scan - * resource. - * - * @param string $project - * @param string $location - * @param string $dataScan - * - * @return string The formatted data_scan resource. - */ - public static function dataScanName($project, $location, $dataScan) - { - return self::getDataScanNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'dataScan' => $dataScan, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * data_scan_job resource. - * - * @param string $project - * @param string $location - * @param string $dataScan - * @param string $job - * - * @return string The formatted data_scan_job resource. - */ - public static function dataScanJobName($project, $location, $dataScan, $job) - { - return self::getDataScanJobNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'dataScan' => $dataScan, - 'job' => $job, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a entity - * resource. - * - * @param string $project - * @param string $location - * @param string $lake - * @param string $zone - * @param string $entity - * - * @return string The formatted entity resource. - */ - public static function entityName($project, $location, $lake, $zone, $entity) - { - return self::getEntityNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'lake' => $lake, - 'zone' => $zone, - 'entity' => $entity, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a location - * resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted location resource. - */ - public static function locationName($project, $location) - { - return self::getLocationNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - dataScan: projects/{project}/locations/{location}/dataScans/{dataScan} - * - dataScanJob: projects/{project}/locations/{location}/dataScans/{dataScan}/jobs/{job} - * - entity: projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity} - * - location: projects/{project}/locations/{location} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName($formattedName, $template = null) - { - $templateMap = self::getPathTemplateMap(); - if ($template) { - if (!isset($templateMap[$template])) { - throw new ValidationException("Template name $template does not exist"); - } - - return $templateMap[$template]->match($formattedName); - } - - foreach ($templateMap as $templateName => $pathTemplate) { - try { - return $pathTemplate->match($formattedName); - } catch (ValidationException $ex) { - // Swallow the exception to continue trying other path templates - } - } - - throw new ValidationException("Input did not match any known format. Input: $formattedName"); - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'dataplex.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** - * Creates a DataScan resource. - * - * Sample code: - * ``` - * $dataScanServiceClient = new DataScanServiceClient(); - * try { - * $formattedParent = $dataScanServiceClient->locationName('[PROJECT]', '[LOCATION]'); - * $dataScan = new DataScan(); - * $dataScanId = 'data_scan_id'; - * $operationResponse = $dataScanServiceClient->createDataScan($formattedParent, $dataScan, $dataScanId); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $dataScanServiceClient->createDataScan($formattedParent, $dataScan, $dataScanId); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $dataScanServiceClient->resumeOperation($operationName, 'createDataScan'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $dataScanServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the parent location: - * `projects/{project}/locations/{location_id}` - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * @param DataScan $dataScan Required. DataScan resource. - * @param string $dataScanId Required. DataScan identifier. - * - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must end with a number or a letter. - * * Must be between 1-63 characters. - * * Must be unique within the customer project / location. - * @param array $optionalArgs { - * Optional. - * - * @type bool $validateOnly - * Optional. Only validate the request, but do not perform mutations. - * The default is `false`. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function createDataScan($parent, $dataScan, $dataScanId, array $optionalArgs = []) - { - $request = new CreateDataScanRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setDataScan($dataScan); - $request->setDataScanId($dataScanId); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['validateOnly'])) { - $request->setValidateOnly($optionalArgs['validateOnly']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CreateDataScan', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Deletes a DataScan resource. - * - * Sample code: - * ``` - * $dataScanServiceClient = new DataScanServiceClient(); - * try { - * $formattedName = $dataScanServiceClient->dataScanName('[PROJECT]', '[LOCATION]', '[DATASCAN]'); - * $operationResponse = $dataScanServiceClient->deleteDataScan($formattedName); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $dataScanServiceClient->deleteDataScan($formattedName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $dataScanServiceClient->resumeOperation($operationName, 'deleteDataScan'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $dataScanServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the dataScan: - * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function deleteDataScan($name, array $optionalArgs = []) - { - $request = new DeleteDataScanRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('DeleteDataScan', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Generates recommended DataQualityRule from a data profiling DataScan. - * - * Sample code: - * ``` - * $dataScanServiceClient = new DataScanServiceClient(); - * try { - * $name = 'name'; - * $response = $dataScanServiceClient->generateDataQualityRules($name); - * } finally { - * $dataScanServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name should be either - * * the name of a datascan with at least one successful completed data - * profiling job, or - * * the name of a successful completed data profiling datascan job. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Dataplex\V1\GenerateDataQualityRulesResponse - * - * @throws ApiException if the remote call fails - */ - public function generateDataQualityRules($name, array $optionalArgs = []) - { - $request = new GenerateDataQualityRulesRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GenerateDataQualityRules', GenerateDataQualityRulesResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets a DataScan resource. - * - * Sample code: - * ``` - * $dataScanServiceClient = new DataScanServiceClient(); - * try { - * $formattedName = $dataScanServiceClient->dataScanName('[PROJECT]', '[LOCATION]', '[DATASCAN]'); - * $response = $dataScanServiceClient->getDataScan($formattedName); - * } finally { - * $dataScanServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the dataScan: - * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * @param array $optionalArgs { - * Optional. - * - * @type int $view - * Optional. Select the DataScan view to return. Defaults to `BASIC`. - * For allowed values, use constants defined on {@see \Google\Cloud\Dataplex\V1\GetDataScanRequest\DataScanView} - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Dataplex\V1\DataScan - * - * @throws ApiException if the remote call fails - */ - public function getDataScan($name, array $optionalArgs = []) - { - $request = new GetDataScanRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['view'])) { - $request->setView($optionalArgs['view']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetDataScan', DataScan::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets a DataScanJob resource. - * - * Sample code: - * ``` - * $dataScanServiceClient = new DataScanServiceClient(); - * try { - * $formattedName = $dataScanServiceClient->dataScanJobName('[PROJECT]', '[LOCATION]', '[DATASCAN]', '[JOB]'); - * $response = $dataScanServiceClient->getDataScanJob($formattedName); - * } finally { - * $dataScanServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the DataScanJob: - * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}/jobs/{data_scan_job_id}` - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * @param array $optionalArgs { - * Optional. - * - * @type int $view - * Optional. Select the DataScanJob view to return. Defaults to `BASIC`. - * For allowed values, use constants defined on {@see \Google\Cloud\Dataplex\V1\GetDataScanJobRequest\DataScanJobView} - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Dataplex\V1\DataScanJob - * - * @throws ApiException if the remote call fails - */ - public function getDataScanJob($name, array $optionalArgs = []) - { - $request = new GetDataScanJobRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['view'])) { - $request->setView($optionalArgs['view']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetDataScanJob', DataScanJob::class, $optionalArgs, $request)->wait(); - } - - /** - * Lists DataScanJobs under the given DataScan. - * - * Sample code: - * ``` - * $dataScanServiceClient = new DataScanServiceClient(); - * try { - * $formattedParent = $dataScanServiceClient->dataScanName('[PROJECT]', '[LOCATION]', '[DATASCAN]'); - * // Iterate over pages of elements - * $pagedResponse = $dataScanServiceClient->listDataScanJobs($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $dataScanServiceClient->listDataScanJobs($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $dataScanServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the parent environment: - * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}` - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type string $filter - * Optional. An expression for filtering the results of the ListDataScanJobs - * request. - * - * If unspecified, all datascan jobs will be returned. Multiple filters can be - * applied (with `AND`, `OR` logical operators). Filters are case-sensitive. - * - * Allowed fields are: - * - * - `start_time` - * - `end_time` - * - * `start_time` and `end_time` expect RFC-3339 formatted strings (e.g. - * 2018-10-08T18:30:00-07:00). - * - * For instance, 'start_time > 2018-10-08T00:00:00.123456789Z AND end_time < - * 2018-10-09T00:00:00.123456789Z' limits results to DataScanJobs between - * specified start and end times. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listDataScanJobs($parent, array $optionalArgs = []) - { - $request = new ListDataScanJobsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListDataScanJobs', $optionalArgs, ListDataScanJobsResponse::class, $request); - } - - /** - * Lists DataScans. - * - * Sample code: - * ``` - * $dataScanServiceClient = new DataScanServiceClient(); - * try { - * $formattedParent = $dataScanServiceClient->locationName('[PROJECT]', '[LOCATION]'); - * // Iterate over pages of elements - * $pagedResponse = $dataScanServiceClient->listDataScans($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $dataScanServiceClient->listDataScans($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $dataScanServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the parent location: - * `projects/{project}/locations/{location_id}` - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type string $filter - * Optional. Filter request. - * @type string $orderBy - * Optional. Order by fields (`name` or `create_time`) for the result. - * If not specified, the ordering is undefined. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listDataScans($parent, array $optionalArgs = []) - { - $request = new ListDataScansRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['orderBy'])) { - $request->setOrderBy($optionalArgs['orderBy']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListDataScans', $optionalArgs, ListDataScansResponse::class, $request); - } - - /** - * Runs an on-demand execution of a DataScan - * - * Sample code: - * ``` - * $dataScanServiceClient = new DataScanServiceClient(); - * try { - * $formattedName = $dataScanServiceClient->dataScanName('[PROJECT]', '[LOCATION]', '[DATASCAN]'); - * $response = $dataScanServiceClient->runDataScan($formattedName); - * } finally { - * $dataScanServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the DataScan: - * `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}`. - * where `project` refers to a *project_id* or *project_number* and - * `location_id` refers to a GCP region. - * - * Only **OnDemand** data scans are allowed. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Dataplex\V1\RunDataScanResponse - * - * @throws ApiException if the remote call fails - */ - public function runDataScan($name, array $optionalArgs = []) - { - $request = new RunDataScanRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('RunDataScan', RunDataScanResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Updates a DataScan resource. - * - * Sample code: - * ``` - * $dataScanServiceClient = new DataScanServiceClient(); - * try { - * $dataScan = new DataScan(); - * $updateMask = new FieldMask(); - * $operationResponse = $dataScanServiceClient->updateDataScan($dataScan, $updateMask); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $dataScanServiceClient->updateDataScan($dataScan, $updateMask); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $dataScanServiceClient->resumeOperation($operationName, 'updateDataScan'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $dataScanServiceClient->close(); - * } - * ``` - * - * @param DataScan $dataScan Required. DataScan resource to be updated. - * - * Only fields specified in `update_mask` are updated. - * @param FieldMask $updateMask Required. Mask of fields to update. - * @param array $optionalArgs { - * Optional. - * - * @type bool $validateOnly - * Optional. Only validate the request, but do not perform mutations. - * The default is `false`. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function updateDataScan($dataScan, $updateMask, array $optionalArgs = []) - { - $request = new UpdateDataScanRequest(); - $requestParamHeaders = []; - $request->setDataScan($dataScan); - $request->setUpdateMask($updateMask); - $requestParamHeaders['data_scan.name'] = $dataScan->getName(); - if (isset($optionalArgs['validateOnly'])) { - $request->setValidateOnly($optionalArgs['validateOnly']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('UpdateDataScan', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Gets the access control policy for a resource. Returns an empty policy - if the resource exists and does not have a policy set. - * - * Sample code: - * ``` - * $dataScanServiceClient = new DataScanServiceClient(); - * try { - * $resource = 'resource'; - * $response = $dataScanServiceClient->getIamPolicy($resource); - * } finally { - * $dataScanServiceClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy is being requested. - * See the operation documentation for the appropriate value for this field. - * @param array $optionalArgs { - * Optional. - * - * @type GetPolicyOptions $options - * OPTIONAL: A `GetPolicyOptions` object for specifying options to - * `GetIamPolicy`. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Iam\V1\Policy - * - * @throws ApiException if the remote call fails - */ - public function getIamPolicy($resource, array $optionalArgs = []) - { - $request = new GetIamPolicyRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $requestParamHeaders['resource'] = $resource; - if (isset($optionalArgs['options'])) { - $request->setOptions($optionalArgs['options']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetIamPolicy', Policy::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait(); - } - - /** - * Sets the access control policy on the specified resource. Replaces - any existing policy. - - Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` - errors. - * - * Sample code: - * ``` - * $dataScanServiceClient = new DataScanServiceClient(); - * try { - * $resource = 'resource'; - * $policy = new Policy(); - * $response = $dataScanServiceClient->setIamPolicy($resource, $policy); - * } finally { - * $dataScanServiceClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy is being specified. - * See the operation documentation for the appropriate value for this field. - * @param Policy $policy REQUIRED: The complete policy to be applied to the `resource`. The size of - * the policy is limited to a few 10s of KB. An empty policy is a - * valid policy but certain Cloud Platform services (such as Projects) - * might reject them. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - * the fields in the mask will be modified. If no mask is provided, the - * following default mask is used: - * - * `paths: "bindings, etag"` - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Iam\V1\Policy - * - * @throws ApiException if the remote call fails - */ - public function setIamPolicy($resource, $policy, array $optionalArgs = []) - { - $request = new SetIamPolicyRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $request->setPolicy($policy); - $requestParamHeaders['resource'] = $resource; - if (isset($optionalArgs['updateMask'])) { - $request->setUpdateMask($optionalArgs['updateMask']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('SetIamPolicy', Policy::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait(); - } - - /** - * Returns permissions that a caller has on the specified resource. If the - resource does not exist, this will return an empty set of - permissions, not a `NOT_FOUND` error. - - Note: This operation is designed to be used for building - permission-aware UIs and command-line tools, not for authorization - checking. This operation may "fail open" without warning. - * - * Sample code: - * ``` - * $dataScanServiceClient = new DataScanServiceClient(); - * try { - * $resource = 'resource'; - * $permissions = []; - * $response = $dataScanServiceClient->testIamPermissions($resource, $permissions); - * } finally { - * $dataScanServiceClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy detail is being requested. - * See the operation documentation for the appropriate value for this field. - * @param string[] $permissions The set of permissions to check for the `resource`. Permissions with - * wildcards (such as '*' or 'storage.*') are not allowed. For more - * information see - * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Iam\V1\TestIamPermissionsResponse - * - * @throws ApiException if the remote call fails - */ - public function testIamPermissions($resource, $permissions, array $optionalArgs = []) - { - $request = new TestIamPermissionsRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $request->setPermissions($permissions); - $requestParamHeaders['resource'] = $resource; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('TestIamPermissions', TestIamPermissionsResponse::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait(); - } - - /** - * Gets information about a location. - * - * Sample code: - * ``` - * $dataScanServiceClient = new DataScanServiceClient(); - * try { - * $response = $dataScanServiceClient->getLocation(); - * } finally { - * $dataScanServiceClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * Resource name for the location. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Location\Location - * - * @throws ApiException if the remote call fails - */ - public function getLocation(array $optionalArgs = []) - { - $request = new GetLocationRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - $requestParamHeaders['name'] = $optionalArgs['name']; - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetLocation', Location::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.cloud.location.Locations')->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * Sample code: - * ``` - * $dataScanServiceClient = new DataScanServiceClient(); - * try { - * // Iterate over pages of elements - * $pagedResponse = $dataScanServiceClient->listLocations(); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $dataScanServiceClient->listLocations(); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $dataScanServiceClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * The resource that owns the locations collection, if applicable. - * @type string $filter - * The standard list filter. - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listLocations(array $optionalArgs = []) - { - $request = new ListLocationsRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - $requestParamHeaders['name'] = $optionalArgs['name']; - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListLocations', $optionalArgs, ListLocationsResponse::class, $request, 'google.cloud.location.Locations'); - } -} diff --git a/owl-bot-staging/Dataplex/v1/src/V1/Gapic/DataTaxonomyServiceGapicClient.php b/owl-bot-staging/Dataplex/v1/src/V1/Gapic/DataTaxonomyServiceGapicClient.php deleted file mode 100644 index bb73dcb479c3..000000000000 --- a/owl-bot-staging/Dataplex/v1/src/V1/Gapic/DataTaxonomyServiceGapicClient.php +++ /dev/null @@ -1,1773 +0,0 @@ -dataTaxonomyName('[PROJECT]', '[LOCATION]', '[DATA_TAXONOMY_ID]'); - * $dataAttributeId = 'data_attribute_id'; - * $dataAttribute = new DataAttribute(); - * $operationResponse = $dataTaxonomyServiceClient->createDataAttribute($formattedParent, $dataAttributeId, $dataAttribute); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $dataTaxonomyServiceClient->createDataAttribute($formattedParent, $dataAttributeId, $dataAttribute); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $dataTaxonomyServiceClient->resumeOperation($operationName, 'createDataAttribute'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $dataTaxonomyServiceClient->close(); - * } - * ``` - * - * Many parameters require resource names to be formatted in a particular way. To - * assist with these names, this class includes a format method for each type of - * name, and additionally a parseName method to extract the individual identifiers - * contained within formatted names that are returned by the API. - * - * @deprecated Please use the new service client {@see \Google\Cloud\Dataplex\V1\Client\DataTaxonomyServiceClient}. - */ -class DataTaxonomyServiceGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.dataplex.v1.DataTaxonomyService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - const SERVICE_ADDRESS = 'dataplex.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'dataplex.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private static $dataAttributeNameTemplate; - - private static $dataAttributeBindingNameTemplate; - - private static $dataTaxonomyNameTemplate; - - private static $locationNameTemplate; - - private static $pathTemplateMap; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/data_taxonomy_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/data_taxonomy_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/data_taxonomy_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/data_taxonomy_service_rest_client_config.php', - ], - ], - ]; - } - - private static function getDataAttributeNameTemplate() - { - if (self::$dataAttributeNameTemplate == null) { - self::$dataAttributeNameTemplate = new PathTemplate('projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}'); - } - - return self::$dataAttributeNameTemplate; - } - - private static function getDataAttributeBindingNameTemplate() - { - if (self::$dataAttributeBindingNameTemplate == null) { - self::$dataAttributeBindingNameTemplate = new PathTemplate('projects/{project}/locations/{location}/dataAttributeBindings/{data_attribute_binding_id}'); - } - - return self::$dataAttributeBindingNameTemplate; - } - - private static function getDataTaxonomyNameTemplate() - { - if (self::$dataTaxonomyNameTemplate == null) { - self::$dataTaxonomyNameTemplate = new PathTemplate('projects/{project}/locations/{location}/dataTaxonomies/{data_taxonomy_id}'); - } - - return self::$dataTaxonomyNameTemplate; - } - - private static function getLocationNameTemplate() - { - if (self::$locationNameTemplate == null) { - self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); - } - - return self::$locationNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'dataAttribute' => self::getDataAttributeNameTemplate(), - 'dataAttributeBinding' => self::getDataAttributeBindingNameTemplate(), - 'dataTaxonomy' => self::getDataTaxonomyNameTemplate(), - 'location' => self::getLocationNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a - * data_attribute resource. - * - * @param string $project - * @param string $location - * @param string $dataTaxonomy - * @param string $dataAttributeId - * - * @return string The formatted data_attribute resource. - */ - public static function dataAttributeName($project, $location, $dataTaxonomy, $dataAttributeId) - { - return self::getDataAttributeNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'dataTaxonomy' => $dataTaxonomy, - 'data_attribute_id' => $dataAttributeId, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * data_attribute_binding resource. - * - * @param string $project - * @param string $location - * @param string $dataAttributeBindingId - * - * @return string The formatted data_attribute_binding resource. - */ - public static function dataAttributeBindingName($project, $location, $dataAttributeBindingId) - { - return self::getDataAttributeBindingNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'data_attribute_binding_id' => $dataAttributeBindingId, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * data_taxonomy resource. - * - * @param string $project - * @param string $location - * @param string $dataTaxonomyId - * - * @return string The formatted data_taxonomy resource. - */ - public static function dataTaxonomyName($project, $location, $dataTaxonomyId) - { - return self::getDataTaxonomyNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'data_taxonomy_id' => $dataTaxonomyId, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a location - * resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted location resource. - */ - public static function locationName($project, $location) - { - return self::getLocationNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - dataAttribute: projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id} - * - dataAttributeBinding: projects/{project}/locations/{location}/dataAttributeBindings/{data_attribute_binding_id} - * - dataTaxonomy: projects/{project}/locations/{location}/dataTaxonomies/{data_taxonomy_id} - * - location: projects/{project}/locations/{location} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName($formattedName, $template = null) - { - $templateMap = self::getPathTemplateMap(); - if ($template) { - if (!isset($templateMap[$template])) { - throw new ValidationException("Template name $template does not exist"); - } - - return $templateMap[$template]->match($formattedName); - } - - foreach ($templateMap as $templateName => $pathTemplate) { - try { - return $pathTemplate->match($formattedName); - } catch (ValidationException $ex) { - // Swallow the exception to continue trying other path templates - } - } - - throw new ValidationException("Input did not match any known format. Input: $formattedName"); - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'dataplex.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** - * Create a DataAttribute resource. - * - * Sample code: - * ``` - * $dataTaxonomyServiceClient = new DataTaxonomyServiceClient(); - * try { - * $formattedParent = $dataTaxonomyServiceClient->dataTaxonomyName('[PROJECT]', '[LOCATION]', '[DATA_TAXONOMY_ID]'); - * $dataAttributeId = 'data_attribute_id'; - * $dataAttribute = new DataAttribute(); - * $operationResponse = $dataTaxonomyServiceClient->createDataAttribute($formattedParent, $dataAttributeId, $dataAttribute); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $dataTaxonomyServiceClient->createDataAttribute($formattedParent, $dataAttributeId, $dataAttribute); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $dataTaxonomyServiceClient->resumeOperation($operationName, 'createDataAttribute'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $dataTaxonomyServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the parent data taxonomy - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} - * @param string $dataAttributeId Required. DataAttribute identifier. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * * Must be unique within the DataTaxonomy. - * @param DataAttribute $dataAttribute Required. DataAttribute resource. - * @param array $optionalArgs { - * Optional. - * - * @type bool $validateOnly - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function createDataAttribute($parent, $dataAttributeId, $dataAttribute, array $optionalArgs = []) - { - $request = new CreateDataAttributeRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setDataAttributeId($dataAttributeId); - $request->setDataAttribute($dataAttribute); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['validateOnly'])) { - $request->setValidateOnly($optionalArgs['validateOnly']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CreateDataAttribute', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Create a DataAttributeBinding resource. - * - * Sample code: - * ``` - * $dataTaxonomyServiceClient = new DataTaxonomyServiceClient(); - * try { - * $formattedParent = $dataTaxonomyServiceClient->locationName('[PROJECT]', '[LOCATION]'); - * $dataAttributeBindingId = 'data_attribute_binding_id'; - * $dataAttributeBinding = new DataAttributeBinding(); - * $operationResponse = $dataTaxonomyServiceClient->createDataAttributeBinding($formattedParent, $dataAttributeBindingId, $dataAttributeBinding); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $dataTaxonomyServiceClient->createDataAttributeBinding($formattedParent, $dataAttributeBindingId, $dataAttributeBinding); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $dataTaxonomyServiceClient->resumeOperation($operationName, 'createDataAttributeBinding'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $dataTaxonomyServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the parent data taxonomy - * projects/{project_number}/locations/{location_id} - * @param string $dataAttributeBindingId Required. DataAttributeBinding identifier. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * * Must be unique within the Location. - * @param DataAttributeBinding $dataAttributeBinding Required. DataAttributeBinding resource. - * @param array $optionalArgs { - * Optional. - * - * @type bool $validateOnly - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function createDataAttributeBinding($parent, $dataAttributeBindingId, $dataAttributeBinding, array $optionalArgs = []) - { - $request = new CreateDataAttributeBindingRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setDataAttributeBindingId($dataAttributeBindingId); - $request->setDataAttributeBinding($dataAttributeBinding); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['validateOnly'])) { - $request->setValidateOnly($optionalArgs['validateOnly']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CreateDataAttributeBinding', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Create a DataTaxonomy resource. - * - * Sample code: - * ``` - * $dataTaxonomyServiceClient = new DataTaxonomyServiceClient(); - * try { - * $formattedParent = $dataTaxonomyServiceClient->locationName('[PROJECT]', '[LOCATION]'); - * $dataTaxonomyId = 'data_taxonomy_id'; - * $dataTaxonomy = new DataTaxonomy(); - * $operationResponse = $dataTaxonomyServiceClient->createDataTaxonomy($formattedParent, $dataTaxonomyId, $dataTaxonomy); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $dataTaxonomyServiceClient->createDataTaxonomy($formattedParent, $dataTaxonomyId, $dataTaxonomy); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $dataTaxonomyServiceClient->resumeOperation($operationName, 'createDataTaxonomy'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $dataTaxonomyServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the data taxonomy location, of the form: - * projects/{project_number}/locations/{location_id} - * where `location_id` refers to a GCP region. - * @param string $dataTaxonomyId Required. DataTaxonomy identifier. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * * Must be unique within the Project. - * @param DataTaxonomy $dataTaxonomy Required. DataTaxonomy resource. - * @param array $optionalArgs { - * Optional. - * - * @type bool $validateOnly - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function createDataTaxonomy($parent, $dataTaxonomyId, $dataTaxonomy, array $optionalArgs = []) - { - $request = new CreateDataTaxonomyRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setDataTaxonomyId($dataTaxonomyId); - $request->setDataTaxonomy($dataTaxonomy); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['validateOnly'])) { - $request->setValidateOnly($optionalArgs['validateOnly']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CreateDataTaxonomy', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Deletes a Data Attribute resource. - * - * Sample code: - * ``` - * $dataTaxonomyServiceClient = new DataTaxonomyServiceClient(); - * try { - * $formattedName = $dataTaxonomyServiceClient->dataAttributeName('[PROJECT]', '[LOCATION]', '[DATATAXONOMY]', '[DATA_ATTRIBUTE_ID]'); - * $operationResponse = $dataTaxonomyServiceClient->deleteDataAttribute($formattedName); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $dataTaxonomyServiceClient->deleteDataAttribute($formattedName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $dataTaxonomyServiceClient->resumeOperation($operationName, 'deleteDataAttribute'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $dataTaxonomyServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the DataAttribute: - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id} - * @param array $optionalArgs { - * Optional. - * - * @type string $etag - * Optional. If the client provided etag value does not match the current etag - * value, the DeleteDataAttribute method returns an ABORTED error response. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function deleteDataAttribute($name, array $optionalArgs = []) - { - $request = new DeleteDataAttributeRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['etag'])) { - $request->setEtag($optionalArgs['etag']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('DeleteDataAttribute', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Deletes a DataAttributeBinding resource. All attributes within the - * DataAttributeBinding must be deleted before the DataAttributeBinding can be - * deleted. - * - * Sample code: - * ``` - * $dataTaxonomyServiceClient = new DataTaxonomyServiceClient(); - * try { - * $formattedName = $dataTaxonomyServiceClient->dataAttributeBindingName('[PROJECT]', '[LOCATION]', '[DATA_ATTRIBUTE_BINDING_ID]'); - * $etag = 'etag'; - * $operationResponse = $dataTaxonomyServiceClient->deleteDataAttributeBinding($formattedName, $etag); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $dataTaxonomyServiceClient->deleteDataAttributeBinding($formattedName, $etag); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $dataTaxonomyServiceClient->resumeOperation($operationName, 'deleteDataAttributeBinding'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $dataTaxonomyServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the DataAttributeBinding: - * projects/{project_number}/locations/{location_id}/dataAttributeBindings/{data_attribute_binding_id} - * @param string $etag Required. If the client provided etag value does not match the current etag - * value, the DeleteDataAttributeBindingRequest method returns an ABORTED - * error response. Etags must be used when calling the - * DeleteDataAttributeBinding. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function deleteDataAttributeBinding($name, $etag, array $optionalArgs = []) - { - $request = new DeleteDataAttributeBindingRequest(); - $requestParamHeaders = []; - $request->setName($name); - $request->setEtag($etag); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('DeleteDataAttributeBinding', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Deletes a DataTaxonomy resource. All attributes within the DataTaxonomy - * must be deleted before the DataTaxonomy can be deleted. - * - * Sample code: - * ``` - * $dataTaxonomyServiceClient = new DataTaxonomyServiceClient(); - * try { - * $formattedName = $dataTaxonomyServiceClient->dataTaxonomyName('[PROJECT]', '[LOCATION]', '[DATA_TAXONOMY_ID]'); - * $operationResponse = $dataTaxonomyServiceClient->deleteDataTaxonomy($formattedName); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $dataTaxonomyServiceClient->deleteDataTaxonomy($formattedName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $dataTaxonomyServiceClient->resumeOperation($operationName, 'deleteDataTaxonomy'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $dataTaxonomyServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the DataTaxonomy: - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} - * @param array $optionalArgs { - * Optional. - * - * @type string $etag - * Optional. If the client provided etag value does not match the current etag - * value,the DeleteDataTaxonomy method returns an ABORTED error. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function deleteDataTaxonomy($name, array $optionalArgs = []) - { - $request = new DeleteDataTaxonomyRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['etag'])) { - $request->setEtag($optionalArgs['etag']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('DeleteDataTaxonomy', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Retrieves a Data Attribute resource. - * - * Sample code: - * ``` - * $dataTaxonomyServiceClient = new DataTaxonomyServiceClient(); - * try { - * $formattedName = $dataTaxonomyServiceClient->dataAttributeName('[PROJECT]', '[LOCATION]', '[DATATAXONOMY]', '[DATA_ATTRIBUTE_ID]'); - * $response = $dataTaxonomyServiceClient->getDataAttribute($formattedName); - * } finally { - * $dataTaxonomyServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the dataAttribute: - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id} - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Dataplex\V1\DataAttribute - * - * @throws ApiException if the remote call fails - */ - public function getDataAttribute($name, array $optionalArgs = []) - { - $request = new GetDataAttributeRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetDataAttribute', DataAttribute::class, $optionalArgs, $request)->wait(); - } - - /** - * Retrieves a DataAttributeBinding resource. - * - * Sample code: - * ``` - * $dataTaxonomyServiceClient = new DataTaxonomyServiceClient(); - * try { - * $formattedName = $dataTaxonomyServiceClient->dataAttributeBindingName('[PROJECT]', '[LOCATION]', '[DATA_ATTRIBUTE_BINDING_ID]'); - * $response = $dataTaxonomyServiceClient->getDataAttributeBinding($formattedName); - * } finally { - * $dataTaxonomyServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the DataAttributeBinding: - * projects/{project_number}/locations/{location_id}/dataAttributeBindings/{data_attribute_binding_id} - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Dataplex\V1\DataAttributeBinding - * - * @throws ApiException if the remote call fails - */ - public function getDataAttributeBinding($name, array $optionalArgs = []) - { - $request = new GetDataAttributeBindingRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetDataAttributeBinding', DataAttributeBinding::class, $optionalArgs, $request)->wait(); - } - - /** - * Retrieves a DataTaxonomy resource. - * - * Sample code: - * ``` - * $dataTaxonomyServiceClient = new DataTaxonomyServiceClient(); - * try { - * $formattedName = $dataTaxonomyServiceClient->dataTaxonomyName('[PROJECT]', '[LOCATION]', '[DATA_TAXONOMY_ID]'); - * $response = $dataTaxonomyServiceClient->getDataTaxonomy($formattedName); - * } finally { - * $dataTaxonomyServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the DataTaxonomy: - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Dataplex\V1\DataTaxonomy - * - * @throws ApiException if the remote call fails - */ - public function getDataTaxonomy($name, array $optionalArgs = []) - { - $request = new GetDataTaxonomyRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetDataTaxonomy', DataTaxonomy::class, $optionalArgs, $request)->wait(); - } - - /** - * Lists DataAttributeBinding resources in a project and location. - * - * Sample code: - * ``` - * $dataTaxonomyServiceClient = new DataTaxonomyServiceClient(); - * try { - * $formattedParent = $dataTaxonomyServiceClient->locationName('[PROJECT]', '[LOCATION]'); - * // Iterate over pages of elements - * $pagedResponse = $dataTaxonomyServiceClient->listDataAttributeBindings($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $dataTaxonomyServiceClient->listDataAttributeBindings($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $dataTaxonomyServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the Location: - * projects/{project_number}/locations/{location_id} - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type string $filter - * Optional. Filter request. - * Filter using resource: filter=resource:"resource-name" - * Filter using attribute: filter=attributes:"attribute-name" - * Filter using attribute in paths list: - * filter=paths.attributes:"attribute-name" - * @type string $orderBy - * Optional. Order by fields for the result. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listDataAttributeBindings($parent, array $optionalArgs = []) - { - $request = new ListDataAttributeBindingsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['orderBy'])) { - $request->setOrderBy($optionalArgs['orderBy']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListDataAttributeBindings', $optionalArgs, ListDataAttributeBindingsResponse::class, $request); - } - - /** - * Lists Data Attribute resources in a DataTaxonomy. - * - * Sample code: - * ``` - * $dataTaxonomyServiceClient = new DataTaxonomyServiceClient(); - * try { - * $formattedParent = $dataTaxonomyServiceClient->dataTaxonomyName('[PROJECT]', '[LOCATION]', '[DATA_TAXONOMY_ID]'); - * // Iterate over pages of elements - * $pagedResponse = $dataTaxonomyServiceClient->listDataAttributes($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $dataTaxonomyServiceClient->listDataAttributes($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $dataTaxonomyServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the DataTaxonomy: - * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type string $filter - * Optional. Filter request. - * @type string $orderBy - * Optional. Order by fields for the result. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listDataAttributes($parent, array $optionalArgs = []) - { - $request = new ListDataAttributesRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['orderBy'])) { - $request->setOrderBy($optionalArgs['orderBy']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListDataAttributes', $optionalArgs, ListDataAttributesResponse::class, $request); - } - - /** - * Lists DataTaxonomy resources in a project and location. - * - * Sample code: - * ``` - * $dataTaxonomyServiceClient = new DataTaxonomyServiceClient(); - * try { - * $formattedParent = $dataTaxonomyServiceClient->locationName('[PROJECT]', '[LOCATION]'); - * // Iterate over pages of elements - * $pagedResponse = $dataTaxonomyServiceClient->listDataTaxonomies($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $dataTaxonomyServiceClient->listDataTaxonomies($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $dataTaxonomyServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the DataTaxonomy location, of the form: - * projects/{project_number}/locations/{location_id} - * where `location_id` refers to a GCP region. - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type string $filter - * Optional. Filter request. - * @type string $orderBy - * Optional. Order by fields for the result. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listDataTaxonomies($parent, array $optionalArgs = []) - { - $request = new ListDataTaxonomiesRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['orderBy'])) { - $request->setOrderBy($optionalArgs['orderBy']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListDataTaxonomies', $optionalArgs, ListDataTaxonomiesResponse::class, $request); - } - - /** - * Updates a DataAttribute resource. - * - * Sample code: - * ``` - * $dataTaxonomyServiceClient = new DataTaxonomyServiceClient(); - * try { - * $updateMask = new FieldMask(); - * $dataAttribute = new DataAttribute(); - * $operationResponse = $dataTaxonomyServiceClient->updateDataAttribute($updateMask, $dataAttribute); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $dataTaxonomyServiceClient->updateDataAttribute($updateMask, $dataAttribute); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $dataTaxonomyServiceClient->resumeOperation($operationName, 'updateDataAttribute'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $dataTaxonomyServiceClient->close(); - * } - * ``` - * - * @param FieldMask $updateMask Required. Mask of fields to update. - * @param DataAttribute $dataAttribute Required. Only fields specified in `update_mask` are updated. - * @param array $optionalArgs { - * Optional. - * - * @type bool $validateOnly - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function updateDataAttribute($updateMask, $dataAttribute, array $optionalArgs = []) - { - $request = new UpdateDataAttributeRequest(); - $requestParamHeaders = []; - $request->setUpdateMask($updateMask); - $request->setDataAttribute($dataAttribute); - $requestParamHeaders['data_attribute.name'] = $dataAttribute->getName(); - if (isset($optionalArgs['validateOnly'])) { - $request->setValidateOnly($optionalArgs['validateOnly']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('UpdateDataAttribute', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Updates a DataAttributeBinding resource. - * - * Sample code: - * ``` - * $dataTaxonomyServiceClient = new DataTaxonomyServiceClient(); - * try { - * $updateMask = new FieldMask(); - * $dataAttributeBinding = new DataAttributeBinding(); - * $operationResponse = $dataTaxonomyServiceClient->updateDataAttributeBinding($updateMask, $dataAttributeBinding); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $dataTaxonomyServiceClient->updateDataAttributeBinding($updateMask, $dataAttributeBinding); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $dataTaxonomyServiceClient->resumeOperation($operationName, 'updateDataAttributeBinding'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $dataTaxonomyServiceClient->close(); - * } - * ``` - * - * @param FieldMask $updateMask Required. Mask of fields to update. - * @param DataAttributeBinding $dataAttributeBinding Required. Only fields specified in `update_mask` are updated. - * @param array $optionalArgs { - * Optional. - * - * @type bool $validateOnly - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function updateDataAttributeBinding($updateMask, $dataAttributeBinding, array $optionalArgs = []) - { - $request = new UpdateDataAttributeBindingRequest(); - $requestParamHeaders = []; - $request->setUpdateMask($updateMask); - $request->setDataAttributeBinding($dataAttributeBinding); - $requestParamHeaders['data_attribute_binding.name'] = $dataAttributeBinding->getName(); - if (isset($optionalArgs['validateOnly'])) { - $request->setValidateOnly($optionalArgs['validateOnly']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('UpdateDataAttributeBinding', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Updates a DataTaxonomy resource. - * - * Sample code: - * ``` - * $dataTaxonomyServiceClient = new DataTaxonomyServiceClient(); - * try { - * $updateMask = new FieldMask(); - * $dataTaxonomy = new DataTaxonomy(); - * $operationResponse = $dataTaxonomyServiceClient->updateDataTaxonomy($updateMask, $dataTaxonomy); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $dataTaxonomyServiceClient->updateDataTaxonomy($updateMask, $dataTaxonomy); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $dataTaxonomyServiceClient->resumeOperation($operationName, 'updateDataTaxonomy'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $dataTaxonomyServiceClient->close(); - * } - * ``` - * - * @param FieldMask $updateMask Required. Mask of fields to update. - * @param DataTaxonomy $dataTaxonomy Required. Only fields specified in `update_mask` are updated. - * @param array $optionalArgs { - * Optional. - * - * @type bool $validateOnly - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function updateDataTaxonomy($updateMask, $dataTaxonomy, array $optionalArgs = []) - { - $request = new UpdateDataTaxonomyRequest(); - $requestParamHeaders = []; - $request->setUpdateMask($updateMask); - $request->setDataTaxonomy($dataTaxonomy); - $requestParamHeaders['data_taxonomy.name'] = $dataTaxonomy->getName(); - if (isset($optionalArgs['validateOnly'])) { - $request->setValidateOnly($optionalArgs['validateOnly']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('UpdateDataTaxonomy', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Gets the access control policy for a resource. Returns an empty policy - if the resource exists and does not have a policy set. - * - * Sample code: - * ``` - * $dataTaxonomyServiceClient = new DataTaxonomyServiceClient(); - * try { - * $resource = 'resource'; - * $response = $dataTaxonomyServiceClient->getIamPolicy($resource); - * } finally { - * $dataTaxonomyServiceClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy is being requested. - * See the operation documentation for the appropriate value for this field. - * @param array $optionalArgs { - * Optional. - * - * @type GetPolicyOptions $options - * OPTIONAL: A `GetPolicyOptions` object for specifying options to - * `GetIamPolicy`. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Iam\V1\Policy - * - * @throws ApiException if the remote call fails - */ - public function getIamPolicy($resource, array $optionalArgs = []) - { - $request = new GetIamPolicyRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $requestParamHeaders['resource'] = $resource; - if (isset($optionalArgs['options'])) { - $request->setOptions($optionalArgs['options']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetIamPolicy', Policy::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait(); - } - - /** - * Sets the access control policy on the specified resource. Replaces - any existing policy. - - Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` - errors. - * - * Sample code: - * ``` - * $dataTaxonomyServiceClient = new DataTaxonomyServiceClient(); - * try { - * $resource = 'resource'; - * $policy = new Policy(); - * $response = $dataTaxonomyServiceClient->setIamPolicy($resource, $policy); - * } finally { - * $dataTaxonomyServiceClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy is being specified. - * See the operation documentation for the appropriate value for this field. - * @param Policy $policy REQUIRED: The complete policy to be applied to the `resource`. The size of - * the policy is limited to a few 10s of KB. An empty policy is a - * valid policy but certain Cloud Platform services (such as Projects) - * might reject them. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - * the fields in the mask will be modified. If no mask is provided, the - * following default mask is used: - * - * `paths: "bindings, etag"` - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Iam\V1\Policy - * - * @throws ApiException if the remote call fails - */ - public function setIamPolicy($resource, $policy, array $optionalArgs = []) - { - $request = new SetIamPolicyRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $request->setPolicy($policy); - $requestParamHeaders['resource'] = $resource; - if (isset($optionalArgs['updateMask'])) { - $request->setUpdateMask($optionalArgs['updateMask']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('SetIamPolicy', Policy::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait(); - } - - /** - * Returns permissions that a caller has on the specified resource. If the - resource does not exist, this will return an empty set of - permissions, not a `NOT_FOUND` error. - - Note: This operation is designed to be used for building - permission-aware UIs and command-line tools, not for authorization - checking. This operation may "fail open" without warning. - * - * Sample code: - * ``` - * $dataTaxonomyServiceClient = new DataTaxonomyServiceClient(); - * try { - * $resource = 'resource'; - * $permissions = []; - * $response = $dataTaxonomyServiceClient->testIamPermissions($resource, $permissions); - * } finally { - * $dataTaxonomyServiceClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy detail is being requested. - * See the operation documentation for the appropriate value for this field. - * @param string[] $permissions The set of permissions to check for the `resource`. Permissions with - * wildcards (such as '*' or 'storage.*') are not allowed. For more - * information see - * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Iam\V1\TestIamPermissionsResponse - * - * @throws ApiException if the remote call fails - */ - public function testIamPermissions($resource, $permissions, array $optionalArgs = []) - { - $request = new TestIamPermissionsRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $request->setPermissions($permissions); - $requestParamHeaders['resource'] = $resource; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('TestIamPermissions', TestIamPermissionsResponse::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait(); - } - - /** - * Gets information about a location. - * - * Sample code: - * ``` - * $dataTaxonomyServiceClient = new DataTaxonomyServiceClient(); - * try { - * $response = $dataTaxonomyServiceClient->getLocation(); - * } finally { - * $dataTaxonomyServiceClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * Resource name for the location. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Location\Location - * - * @throws ApiException if the remote call fails - */ - public function getLocation(array $optionalArgs = []) - { - $request = new GetLocationRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - $requestParamHeaders['name'] = $optionalArgs['name']; - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetLocation', Location::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.cloud.location.Locations')->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * Sample code: - * ``` - * $dataTaxonomyServiceClient = new DataTaxonomyServiceClient(); - * try { - * // Iterate over pages of elements - * $pagedResponse = $dataTaxonomyServiceClient->listLocations(); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $dataTaxonomyServiceClient->listLocations(); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $dataTaxonomyServiceClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * The resource that owns the locations collection, if applicable. - * @type string $filter - * The standard list filter. - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listLocations(array $optionalArgs = []) - { - $request = new ListLocationsRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - $requestParamHeaders['name'] = $optionalArgs['name']; - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListLocations', $optionalArgs, ListLocationsResponse::class, $request, 'google.cloud.location.Locations'); - } -} diff --git a/owl-bot-staging/Dataplex/v1/src/V1/Gapic/DataplexServiceGapicClient.php b/owl-bot-staging/Dataplex/v1/src/V1/Gapic/DataplexServiceGapicClient.php deleted file mode 100644 index 15b48faabfe3..000000000000 --- a/owl-bot-staging/Dataplex/v1/src/V1/Gapic/DataplexServiceGapicClient.php +++ /dev/null @@ -1,3051 +0,0 @@ -jobName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]', '[JOB]'); - * $dataplexServiceClient->cancelJob($formattedName); - * } finally { - * $dataplexServiceClient->close(); - * } - * ``` - * - * Many parameters require resource names to be formatted in a particular way. To - * assist with these names, this class includes a format method for each type of - * name, and additionally a parseName method to extract the individual identifiers - * contained within formatted names that are returned by the API. - * - * @deprecated Please use the new service client {@see \Google\Cloud\Dataplex\V1\Client\DataplexServiceClient}. - */ -class DataplexServiceGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.dataplex.v1.DataplexService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - const SERVICE_ADDRESS = 'dataplex.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'dataplex.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private static $assetNameTemplate; - - private static $environmentNameTemplate; - - private static $jobNameTemplate; - - private static $lakeNameTemplate; - - private static $locationNameTemplate; - - private static $taskNameTemplate; - - private static $zoneNameTemplate; - - private static $pathTemplateMap; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/dataplex_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/dataplex_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/dataplex_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/dataplex_service_rest_client_config.php', - ], - ], - ]; - } - - private static function getAssetNameTemplate() - { - if (self::$assetNameTemplate == null) { - self::$assetNameTemplate = new PathTemplate('projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}'); - } - - return self::$assetNameTemplate; - } - - private static function getEnvironmentNameTemplate() - { - if (self::$environmentNameTemplate == null) { - self::$environmentNameTemplate = new PathTemplate('projects/{project}/locations/{location}/lakes/{lake}/environments/{environment}'); - } - - return self::$environmentNameTemplate; - } - - private static function getJobNameTemplate() - { - if (self::$jobNameTemplate == null) { - self::$jobNameTemplate = new PathTemplate('projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}/jobs/{job}'); - } - - return self::$jobNameTemplate; - } - - private static function getLakeNameTemplate() - { - if (self::$lakeNameTemplate == null) { - self::$lakeNameTemplate = new PathTemplate('projects/{project}/locations/{location}/lakes/{lake}'); - } - - return self::$lakeNameTemplate; - } - - private static function getLocationNameTemplate() - { - if (self::$locationNameTemplate == null) { - self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); - } - - return self::$locationNameTemplate; - } - - private static function getTaskNameTemplate() - { - if (self::$taskNameTemplate == null) { - self::$taskNameTemplate = new PathTemplate('projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}'); - } - - return self::$taskNameTemplate; - } - - private static function getZoneNameTemplate() - { - if (self::$zoneNameTemplate == null) { - self::$zoneNameTemplate = new PathTemplate('projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}'); - } - - return self::$zoneNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'asset' => self::getAssetNameTemplate(), - 'environment' => self::getEnvironmentNameTemplate(), - 'job' => self::getJobNameTemplate(), - 'lake' => self::getLakeNameTemplate(), - 'location' => self::getLocationNameTemplate(), - 'task' => self::getTaskNameTemplate(), - 'zone' => self::getZoneNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a asset - * resource. - * - * @param string $project - * @param string $location - * @param string $lake - * @param string $zone - * @param string $asset - * - * @return string The formatted asset resource. - */ - public static function assetName($project, $location, $lake, $zone, $asset) - { - return self::getAssetNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'lake' => $lake, - 'zone' => $zone, - 'asset' => $asset, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a environment - * resource. - * - * @param string $project - * @param string $location - * @param string $lake - * @param string $environment - * - * @return string The formatted environment resource. - */ - public static function environmentName($project, $location, $lake, $environment) - { - return self::getEnvironmentNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'lake' => $lake, - 'environment' => $environment, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a job - * resource. - * - * @param string $project - * @param string $location - * @param string $lake - * @param string $task - * @param string $job - * - * @return string The formatted job resource. - */ - public static function jobName($project, $location, $lake, $task, $job) - { - return self::getJobNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'lake' => $lake, - 'task' => $task, - 'job' => $job, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a lake - * resource. - * - * @param string $project - * @param string $location - * @param string $lake - * - * @return string The formatted lake resource. - */ - public static function lakeName($project, $location, $lake) - { - return self::getLakeNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'lake' => $lake, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a location - * resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted location resource. - */ - public static function locationName($project, $location) - { - return self::getLocationNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a task - * resource. - * - * @param string $project - * @param string $location - * @param string $lake - * @param string $task - * - * @return string The formatted task resource. - */ - public static function taskName($project, $location, $lake, $task) - { - return self::getTaskNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'lake' => $lake, - 'task' => $task, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a zone - * resource. - * - * @param string $project - * @param string $location - * @param string $lake - * @param string $zone - * - * @return string The formatted zone resource. - */ - public static function zoneName($project, $location, $lake, $zone) - { - return self::getZoneNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'lake' => $lake, - 'zone' => $zone, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - asset: projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset} - * - environment: projects/{project}/locations/{location}/lakes/{lake}/environments/{environment} - * - job: projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}/jobs/{job} - * - lake: projects/{project}/locations/{location}/lakes/{lake} - * - location: projects/{project}/locations/{location} - * - task: projects/{project}/locations/{location}/lakes/{lake}/tasks/{task} - * - zone: projects/{project}/locations/{location}/lakes/{lake}/zones/{zone} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName($formattedName, $template = null) - { - $templateMap = self::getPathTemplateMap(); - if ($template) { - if (!isset($templateMap[$template])) { - throw new ValidationException("Template name $template does not exist"); - } - - return $templateMap[$template]->match($formattedName); - } - - foreach ($templateMap as $templateName => $pathTemplate) { - try { - return $pathTemplate->match($formattedName); - } catch (ValidationException $ex) { - // Swallow the exception to continue trying other path templates - } - } - - throw new ValidationException("Input did not match any known format. Input: $formattedName"); - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'dataplex.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** - * Cancel jobs running for the task resource. - * - * Sample code: - * ``` - * $dataplexServiceClient = new DataplexServiceClient(); - * try { - * $formattedName = $dataplexServiceClient->jobName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]', '[JOB]'); - * $dataplexServiceClient->cancelJob($formattedName); - * } finally { - * $dataplexServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the job: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}/job/{job_id}`. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - */ - public function cancelJob($name, array $optionalArgs = []) - { - $request = new CancelJobRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CancelJob', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates an asset resource. - * - * Sample code: - * ``` - * $dataplexServiceClient = new DataplexServiceClient(); - * try { - * $formattedParent = $dataplexServiceClient->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); - * $assetId = 'asset_id'; - * $asset = new Asset(); - * $operationResponse = $dataplexServiceClient->createAsset($formattedParent, $assetId, $asset); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $dataplexServiceClient->createAsset($formattedParent, $assetId, $asset); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $dataplexServiceClient->resumeOperation($operationName, 'createAsset'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $dataplexServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * @param string $assetId Required. Asset identifier. - * This ID will be used to generate names such as table names when publishing - * metadata to Hive Metastore and BigQuery. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must end with a number or a letter. - * * Must be between 1-63 characters. - * * Must be unique within the zone. - * @param Asset $asset Required. Asset resource. - * @param array $optionalArgs { - * Optional. - * - * @type bool $validateOnly - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function createAsset($parent, $assetId, $asset, array $optionalArgs = []) - { - $request = new CreateAssetRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setAssetId($assetId); - $request->setAsset($asset); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['validateOnly'])) { - $request->setValidateOnly($optionalArgs['validateOnly']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CreateAsset', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Create an environment resource. - * - * Sample code: - * ``` - * $dataplexServiceClient = new DataplexServiceClient(); - * try { - * $formattedParent = $dataplexServiceClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - * $environmentId = 'environment_id'; - * $environment = new Environment(); - * $operationResponse = $dataplexServiceClient->createEnvironment($formattedParent, $environmentId, $environment); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $dataplexServiceClient->createEnvironment($formattedParent, $environmentId, $environment); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $dataplexServiceClient->resumeOperation($operationName, 'createEnvironment'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $dataplexServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the parent lake: - * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`. - * @param string $environmentId Required. Environment identifier. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * * Must be unique within the lake. - * @param Environment $environment Required. Environment resource. - * @param array $optionalArgs { - * Optional. - * - * @type bool $validateOnly - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function createEnvironment($parent, $environmentId, $environment, array $optionalArgs = []) - { - $request = new CreateEnvironmentRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setEnvironmentId($environmentId); - $request->setEnvironment($environment); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['validateOnly'])) { - $request->setValidateOnly($optionalArgs['validateOnly']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CreateEnvironment', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Creates a lake resource. - * - * Sample code: - * ``` - * $dataplexServiceClient = new DataplexServiceClient(); - * try { - * $formattedParent = $dataplexServiceClient->locationName('[PROJECT]', '[LOCATION]'); - * $lakeId = 'lake_id'; - * $lake = new Lake(); - * $operationResponse = $dataplexServiceClient->createLake($formattedParent, $lakeId, $lake); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $dataplexServiceClient->createLake($formattedParent, $lakeId, $lake); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $dataplexServiceClient->resumeOperation($operationName, 'createLake'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $dataplexServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the lake location, of the form: - * projects/{project_number}/locations/{location_id} - * where `location_id` refers to a GCP region. - * @param string $lakeId Required. Lake identifier. - * This ID will be used to generate names such as database and dataset names - * when publishing metadata to Hive Metastore and BigQuery. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must end with a number or a letter. - * * Must be between 1-63 characters. - * * Must be unique within the customer project / location. - * @param Lake $lake Required. Lake resource - * @param array $optionalArgs { - * Optional. - * - * @type bool $validateOnly - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function createLake($parent, $lakeId, $lake, array $optionalArgs = []) - { - $request = new CreateLakeRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setLakeId($lakeId); - $request->setLake($lake); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['validateOnly'])) { - $request->setValidateOnly($optionalArgs['validateOnly']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CreateLake', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Creates a task resource within a lake. - * - * Sample code: - * ``` - * $dataplexServiceClient = new DataplexServiceClient(); - * try { - * $formattedParent = $dataplexServiceClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - * $taskId = 'task_id'; - * $task = new Task(); - * $operationResponse = $dataplexServiceClient->createTask($formattedParent, $taskId, $task); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $dataplexServiceClient->createTask($formattedParent, $taskId, $task); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $dataplexServiceClient->resumeOperation($operationName, 'createTask'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $dataplexServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the parent lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * @param string $taskId Required. Task identifier. - * @param Task $task Required. Task resource. - * @param array $optionalArgs { - * Optional. - * - * @type bool $validateOnly - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function createTask($parent, $taskId, $task, array $optionalArgs = []) - { - $request = new CreateTaskRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setTaskId($taskId); - $request->setTask($task); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['validateOnly'])) { - $request->setValidateOnly($optionalArgs['validateOnly']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CreateTask', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Creates a zone resource within a lake. - * - * Sample code: - * ``` - * $dataplexServiceClient = new DataplexServiceClient(); - * try { - * $formattedParent = $dataplexServiceClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - * $zoneId = 'zone_id'; - * $zone = new Zone(); - * $operationResponse = $dataplexServiceClient->createZone($formattedParent, $zoneId, $zone); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $dataplexServiceClient->createZone($formattedParent, $zoneId, $zone); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $dataplexServiceClient->resumeOperation($operationName, 'createZone'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $dataplexServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the parent lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * @param string $zoneId Required. Zone identifier. - * This ID will be used to generate names such as database and dataset names - * when publishing metadata to Hive Metastore and BigQuery. - * * Must contain only lowercase letters, numbers and hyphens. - * * Must start with a letter. - * * Must end with a number or a letter. - * * Must be between 1-63 characters. - * * Must be unique across all lakes from all locations in a project. - * * Must not be one of the reserved IDs (i.e. "default", "global-temp") - * @param Zone $zone Required. Zone resource. - * @param array $optionalArgs { - * Optional. - * - * @type bool $validateOnly - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function createZone($parent, $zoneId, $zone, array $optionalArgs = []) - { - $request = new CreateZoneRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setZoneId($zoneId); - $request->setZone($zone); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['validateOnly'])) { - $request->setValidateOnly($optionalArgs['validateOnly']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CreateZone', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Deletes an asset resource. The referenced storage resource is detached - * (default) or deleted based on the associated Lifecycle policy. - * - * Sample code: - * ``` - * $dataplexServiceClient = new DataplexServiceClient(); - * try { - * $formattedName = $dataplexServiceClient->assetName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ASSET]'); - * $operationResponse = $dataplexServiceClient->deleteAsset($formattedName); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $dataplexServiceClient->deleteAsset($formattedName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $dataplexServiceClient->resumeOperation($operationName, 'deleteAsset'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $dataplexServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the asset: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function deleteAsset($name, array $optionalArgs = []) - { - $request = new DeleteAssetRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('DeleteAsset', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Delete the environment resource. All the child resources must have been - * deleted before environment deletion can be initiated. - * - * Sample code: - * ``` - * $dataplexServiceClient = new DataplexServiceClient(); - * try { - * $formattedName = $dataplexServiceClient->environmentName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ENVIRONMENT]'); - * $operationResponse = $dataplexServiceClient->deleteEnvironment($formattedName); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $dataplexServiceClient->deleteEnvironment($formattedName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $dataplexServiceClient->resumeOperation($operationName, 'deleteEnvironment'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $dataplexServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the environment: - * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function deleteEnvironment($name, array $optionalArgs = []) - { - $request = new DeleteEnvironmentRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('DeleteEnvironment', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Deletes a lake resource. All zones within the lake must be deleted before - * the lake can be deleted. - * - * Sample code: - * ``` - * $dataplexServiceClient = new DataplexServiceClient(); - * try { - * $formattedName = $dataplexServiceClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - * $operationResponse = $dataplexServiceClient->deleteLake($formattedName); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $dataplexServiceClient->deleteLake($formattedName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $dataplexServiceClient->resumeOperation($operationName, 'deleteLake'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $dataplexServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function deleteLake($name, array $optionalArgs = []) - { - $request = new DeleteLakeRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('DeleteLake', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Delete the task resource. - * - * Sample code: - * ``` - * $dataplexServiceClient = new DataplexServiceClient(); - * try { - * $formattedName = $dataplexServiceClient->taskName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]'); - * $operationResponse = $dataplexServiceClient->deleteTask($formattedName); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $dataplexServiceClient->deleteTask($formattedName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $dataplexServiceClient->resumeOperation($operationName, 'deleteTask'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $dataplexServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the task: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}`. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function deleteTask($name, array $optionalArgs = []) - { - $request = new DeleteTaskRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('DeleteTask', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Deletes a zone resource. All assets within a zone must be deleted before - * the zone can be deleted. - * - * Sample code: - * ``` - * $dataplexServiceClient = new DataplexServiceClient(); - * try { - * $formattedName = $dataplexServiceClient->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); - * $operationResponse = $dataplexServiceClient->deleteZone($formattedName); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $dataplexServiceClient->deleteZone($formattedName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $dataplexServiceClient->resumeOperation($operationName, 'deleteZone'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $dataplexServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function deleteZone($name, array $optionalArgs = []) - { - $request = new DeleteZoneRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('DeleteZone', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Retrieves an asset resource. - * - * Sample code: - * ``` - * $dataplexServiceClient = new DataplexServiceClient(); - * try { - * $formattedName = $dataplexServiceClient->assetName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ASSET]'); - * $response = $dataplexServiceClient->getAsset($formattedName); - * } finally { - * $dataplexServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the asset: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Dataplex\V1\Asset - * - * @throws ApiException if the remote call fails - */ - public function getAsset($name, array $optionalArgs = []) - { - $request = new GetAssetRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetAsset', Asset::class, $optionalArgs, $request)->wait(); - } - - /** - * Get environment resource. - * - * Sample code: - * ``` - * $dataplexServiceClient = new DataplexServiceClient(); - * try { - * $formattedName = $dataplexServiceClient->environmentName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ENVIRONMENT]'); - * $response = $dataplexServiceClient->getEnvironment($formattedName); - * } finally { - * $dataplexServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the environment: - * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Dataplex\V1\Environment - * - * @throws ApiException if the remote call fails - */ - public function getEnvironment($name, array $optionalArgs = []) - { - $request = new GetEnvironmentRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetEnvironment', Environment::class, $optionalArgs, $request)->wait(); - } - - /** - * Get job resource. - * - * Sample code: - * ``` - * $dataplexServiceClient = new DataplexServiceClient(); - * try { - * $formattedName = $dataplexServiceClient->jobName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]', '[JOB]'); - * $response = $dataplexServiceClient->getJob($formattedName); - * } finally { - * $dataplexServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the job: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}/jobs/{job_id}`. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Dataplex\V1\Job - * - * @throws ApiException if the remote call fails - */ - public function getJob($name, array $optionalArgs = []) - { - $request = new GetJobRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetJob', Job::class, $optionalArgs, $request)->wait(); - } - - /** - * Retrieves a lake resource. - * - * Sample code: - * ``` - * $dataplexServiceClient = new DataplexServiceClient(); - * try { - * $formattedName = $dataplexServiceClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - * $response = $dataplexServiceClient->getLake($formattedName); - * } finally { - * $dataplexServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Dataplex\V1\Lake - * - * @throws ApiException if the remote call fails - */ - public function getLake($name, array $optionalArgs = []) - { - $request = new GetLakeRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetLake', Lake::class, $optionalArgs, $request)->wait(); - } - - /** - * Get task resource. - * - * Sample code: - * ``` - * $dataplexServiceClient = new DataplexServiceClient(); - * try { - * $formattedName = $dataplexServiceClient->taskName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]'); - * $response = $dataplexServiceClient->getTask($formattedName); - * } finally { - * $dataplexServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the task: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{tasks_id}`. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Dataplex\V1\Task - * - * @throws ApiException if the remote call fails - */ - public function getTask($name, array $optionalArgs = []) - { - $request = new GetTaskRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetTask', Task::class, $optionalArgs, $request)->wait(); - } - - /** - * Retrieves a zone resource. - * - * Sample code: - * ``` - * $dataplexServiceClient = new DataplexServiceClient(); - * try { - * $formattedName = $dataplexServiceClient->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); - * $response = $dataplexServiceClient->getZone($formattedName); - * } finally { - * $dataplexServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Dataplex\V1\Zone - * - * @throws ApiException if the remote call fails - */ - public function getZone($name, array $optionalArgs = []) - { - $request = new GetZoneRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetZone', Zone::class, $optionalArgs, $request)->wait(); - } - - /** - * Lists action resources in an asset. - * - * Sample code: - * ``` - * $dataplexServiceClient = new DataplexServiceClient(); - * try { - * $formattedParent = $dataplexServiceClient->assetName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ASSET]'); - * // Iterate over pages of elements - * $pagedResponse = $dataplexServiceClient->listAssetActions($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $dataplexServiceClient->listAssetActions($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $dataplexServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the parent asset: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listAssetActions($parent, array $optionalArgs = []) - { - $request = new ListAssetActionsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListAssetActions', $optionalArgs, ListActionsResponse::class, $request); - } - - /** - * Lists asset resources in a zone. - * - * Sample code: - * ``` - * $dataplexServiceClient = new DataplexServiceClient(); - * try { - * $formattedParent = $dataplexServiceClient->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); - * // Iterate over pages of elements - * $pagedResponse = $dataplexServiceClient->listAssets($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $dataplexServiceClient->listAssets($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $dataplexServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type string $filter - * Optional. Filter request. - * @type string $orderBy - * Optional. Order by fields for the result. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listAssets($parent, array $optionalArgs = []) - { - $request = new ListAssetsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['orderBy'])) { - $request->setOrderBy($optionalArgs['orderBy']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListAssets', $optionalArgs, ListAssetsResponse::class, $request); - } - - /** - * Lists environments under the given lake. - * - * Sample code: - * ``` - * $dataplexServiceClient = new DataplexServiceClient(); - * try { - * $formattedParent = $dataplexServiceClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - * // Iterate over pages of elements - * $pagedResponse = $dataplexServiceClient->listEnvironments($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $dataplexServiceClient->listEnvironments($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $dataplexServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the parent lake: - * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`. - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type string $filter - * Optional. Filter request. - * @type string $orderBy - * Optional. Order by fields for the result. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listEnvironments($parent, array $optionalArgs = []) - { - $request = new ListEnvironmentsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['orderBy'])) { - $request->setOrderBy($optionalArgs['orderBy']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListEnvironments', $optionalArgs, ListEnvironmentsResponse::class, $request); - } - - /** - * Lists Jobs under the given task. - * - * Sample code: - * ``` - * $dataplexServiceClient = new DataplexServiceClient(); - * try { - * $formattedParent = $dataplexServiceClient->taskName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]'); - * // Iterate over pages of elements - * $pagedResponse = $dataplexServiceClient->listJobs($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $dataplexServiceClient->listJobs($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $dataplexServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the parent environment: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listJobs($parent, array $optionalArgs = []) - { - $request = new ListJobsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListJobs', $optionalArgs, ListJobsResponse::class, $request); - } - - /** - * Lists action resources in a lake. - * - * Sample code: - * ``` - * $dataplexServiceClient = new DataplexServiceClient(); - * try { - * $formattedParent = $dataplexServiceClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - * // Iterate over pages of elements - * $pagedResponse = $dataplexServiceClient->listLakeActions($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $dataplexServiceClient->listLakeActions($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $dataplexServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the parent lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listLakeActions($parent, array $optionalArgs = []) - { - $request = new ListLakeActionsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListLakeActions', $optionalArgs, ListActionsResponse::class, $request); - } - - /** - * Lists lake resources in a project and location. - * - * Sample code: - * ``` - * $dataplexServiceClient = new DataplexServiceClient(); - * try { - * $formattedParent = $dataplexServiceClient->locationName('[PROJECT]', '[LOCATION]'); - * // Iterate over pages of elements - * $pagedResponse = $dataplexServiceClient->listLakes($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $dataplexServiceClient->listLakes($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $dataplexServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the lake location, of the form: - * `projects/{project_number}/locations/{location_id}` - * where `location_id` refers to a GCP region. - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type string $filter - * Optional. Filter request. - * @type string $orderBy - * Optional. Order by fields for the result. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listLakes($parent, array $optionalArgs = []) - { - $request = new ListLakesRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['orderBy'])) { - $request->setOrderBy($optionalArgs['orderBy']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListLakes', $optionalArgs, ListLakesResponse::class, $request); - } - - /** - * Lists session resources in an environment. - * - * Sample code: - * ``` - * $dataplexServiceClient = new DataplexServiceClient(); - * try { - * $formattedParent = $dataplexServiceClient->environmentName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ENVIRONMENT]'); - * // Iterate over pages of elements - * $pagedResponse = $dataplexServiceClient->listSessions($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $dataplexServiceClient->listSessions($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $dataplexServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the parent environment: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}`. - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type string $filter - * Optional. Filter request. The following `mode` filter is supported to - * return only the sessions belonging to the requester when the mode is USER - * and return sessions of all the users when the mode is ADMIN. When no filter - * is sent default to USER mode. NOTE: When the mode is ADMIN, the requester - * should have `dataplex.environments.listAllSessions` permission to list all - * sessions, in absence of the permission, the request fails. - * - * mode = ADMIN | USER - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listSessions($parent, array $optionalArgs = []) - { - $request = new ListSessionsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListSessions', $optionalArgs, ListSessionsResponse::class, $request); - } - - /** - * Lists tasks under the given lake. - * - * Sample code: - * ``` - * $dataplexServiceClient = new DataplexServiceClient(); - * try { - * $formattedParent = $dataplexServiceClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - * // Iterate over pages of elements - * $pagedResponse = $dataplexServiceClient->listTasks($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $dataplexServiceClient->listTasks($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $dataplexServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the parent lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type string $filter - * Optional. Filter request. - * @type string $orderBy - * Optional. Order by fields for the result. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listTasks($parent, array $optionalArgs = []) - { - $request = new ListTasksRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['orderBy'])) { - $request->setOrderBy($optionalArgs['orderBy']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListTasks', $optionalArgs, ListTasksResponse::class, $request); - } - - /** - * Lists action resources in a zone. - * - * Sample code: - * ``` - * $dataplexServiceClient = new DataplexServiceClient(); - * try { - * $formattedParent = $dataplexServiceClient->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); - * // Iterate over pages of elements - * $pagedResponse = $dataplexServiceClient->listZoneActions($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $dataplexServiceClient->listZoneActions($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $dataplexServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listZoneActions($parent, array $optionalArgs = []) - { - $request = new ListZoneActionsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListZoneActions', $optionalArgs, ListActionsResponse::class, $request); - } - - /** - * Lists zone resources in a lake. - * - * Sample code: - * ``` - * $dataplexServiceClient = new DataplexServiceClient(); - * try { - * $formattedParent = $dataplexServiceClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - * // Iterate over pages of elements - * $pagedResponse = $dataplexServiceClient->listZones($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $dataplexServiceClient->listZones($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $dataplexServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the parent lake: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type string $filter - * Optional. Filter request. - * @type string $orderBy - * Optional. Order by fields for the result. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listZones($parent, array $optionalArgs = []) - { - $request = new ListZonesRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['orderBy'])) { - $request->setOrderBy($optionalArgs['orderBy']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListZones', $optionalArgs, ListZonesResponse::class, $request); - } - - /** - * Run an on demand execution of a Task. - * - * Sample code: - * ``` - * $dataplexServiceClient = new DataplexServiceClient(); - * try { - * $formattedName = $dataplexServiceClient->taskName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]'); - * $response = $dataplexServiceClient->runTask($formattedName); - * } finally { - * $dataplexServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the task: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`. - * @param array $optionalArgs { - * Optional. - * - * @type array $labels - * Optional. User-defined labels for the task. If the map is left empty, the - * task will run with existing labels from task definition. If the map - * contains an entry with a new key, the same will be added to existing set of - * labels. If the map contains an entry with an existing label key in task - * definition, the task will run with new label value for that entry. Clearing - * an existing label will require label value to be explicitly set to a hyphen - * "-". The label value cannot be empty. - * @type array $args - * Optional. Execution spec arguments. If the map is left empty, the task will - * run with existing execution spec args from task definition. If the map - * contains an entry with a new key, the same will be added to existing set of - * args. If the map contains an entry with an existing arg key in task - * definition, the task will run with new arg value for that entry. Clearing - * an existing arg will require arg value to be explicitly set to a hyphen - * "-". The arg value cannot be empty. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Dataplex\V1\RunTaskResponse - * - * @throws ApiException if the remote call fails - */ - public function runTask($name, array $optionalArgs = []) - { - $request = new RunTaskRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['labels'])) { - $request->setLabels($optionalArgs['labels']); - } - - if (isset($optionalArgs['args'])) { - $request->setArgs($optionalArgs['args']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('RunTask', RunTaskResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Updates an asset resource. - * - * Sample code: - * ``` - * $dataplexServiceClient = new DataplexServiceClient(); - * try { - * $updateMask = new FieldMask(); - * $asset = new Asset(); - * $operationResponse = $dataplexServiceClient->updateAsset($updateMask, $asset); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $dataplexServiceClient->updateAsset($updateMask, $asset); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $dataplexServiceClient->resumeOperation($operationName, 'updateAsset'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $dataplexServiceClient->close(); - * } - * ``` - * - * @param FieldMask $updateMask Required. Mask of fields to update. - * @param Asset $asset Required. Update description. - * Only fields specified in `update_mask` are updated. - * @param array $optionalArgs { - * Optional. - * - * @type bool $validateOnly - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function updateAsset($updateMask, $asset, array $optionalArgs = []) - { - $request = new UpdateAssetRequest(); - $requestParamHeaders = []; - $request->setUpdateMask($updateMask); - $request->setAsset($asset); - $requestParamHeaders['asset.name'] = $asset->getName(); - if (isset($optionalArgs['validateOnly'])) { - $request->setValidateOnly($optionalArgs['validateOnly']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('UpdateAsset', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Update the environment resource. - * - * Sample code: - * ``` - * $dataplexServiceClient = new DataplexServiceClient(); - * try { - * $updateMask = new FieldMask(); - * $environment = new Environment(); - * $operationResponse = $dataplexServiceClient->updateEnvironment($updateMask, $environment); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $dataplexServiceClient->updateEnvironment($updateMask, $environment); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $dataplexServiceClient->resumeOperation($operationName, 'updateEnvironment'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $dataplexServiceClient->close(); - * } - * ``` - * - * @param FieldMask $updateMask Required. Mask of fields to update. - * @param Environment $environment Required. Update description. - * Only fields specified in `update_mask` are updated. - * @param array $optionalArgs { - * Optional. - * - * @type bool $validateOnly - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function updateEnvironment($updateMask, $environment, array $optionalArgs = []) - { - $request = new UpdateEnvironmentRequest(); - $requestParamHeaders = []; - $request->setUpdateMask($updateMask); - $request->setEnvironment($environment); - $requestParamHeaders['environment.name'] = $environment->getName(); - if (isset($optionalArgs['validateOnly'])) { - $request->setValidateOnly($optionalArgs['validateOnly']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('UpdateEnvironment', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Updates a lake resource. - * - * Sample code: - * ``` - * $dataplexServiceClient = new DataplexServiceClient(); - * try { - * $updateMask = new FieldMask(); - * $lake = new Lake(); - * $operationResponse = $dataplexServiceClient->updateLake($updateMask, $lake); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $dataplexServiceClient->updateLake($updateMask, $lake); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $dataplexServiceClient->resumeOperation($operationName, 'updateLake'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $dataplexServiceClient->close(); - * } - * ``` - * - * @param FieldMask $updateMask Required. Mask of fields to update. - * @param Lake $lake Required. Update description. - * Only fields specified in `update_mask` are updated. - * @param array $optionalArgs { - * Optional. - * - * @type bool $validateOnly - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function updateLake($updateMask, $lake, array $optionalArgs = []) - { - $request = new UpdateLakeRequest(); - $requestParamHeaders = []; - $request->setUpdateMask($updateMask); - $request->setLake($lake); - $requestParamHeaders['lake.name'] = $lake->getName(); - if (isset($optionalArgs['validateOnly'])) { - $request->setValidateOnly($optionalArgs['validateOnly']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('UpdateLake', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Update the task resource. - * - * Sample code: - * ``` - * $dataplexServiceClient = new DataplexServiceClient(); - * try { - * $updateMask = new FieldMask(); - * $task = new Task(); - * $operationResponse = $dataplexServiceClient->updateTask($updateMask, $task); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $dataplexServiceClient->updateTask($updateMask, $task); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $dataplexServiceClient->resumeOperation($operationName, 'updateTask'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $dataplexServiceClient->close(); - * } - * ``` - * - * @param FieldMask $updateMask Required. Mask of fields to update. - * @param Task $task Required. Update description. - * Only fields specified in `update_mask` are updated. - * @param array $optionalArgs { - * Optional. - * - * @type bool $validateOnly - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function updateTask($updateMask, $task, array $optionalArgs = []) - { - $request = new UpdateTaskRequest(); - $requestParamHeaders = []; - $request->setUpdateMask($updateMask); - $request->setTask($task); - $requestParamHeaders['task.name'] = $task->getName(); - if (isset($optionalArgs['validateOnly'])) { - $request->setValidateOnly($optionalArgs['validateOnly']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('UpdateTask', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Updates a zone resource. - * - * Sample code: - * ``` - * $dataplexServiceClient = new DataplexServiceClient(); - * try { - * $updateMask = new FieldMask(); - * $zone = new Zone(); - * $operationResponse = $dataplexServiceClient->updateZone($updateMask, $zone); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $dataplexServiceClient->updateZone($updateMask, $zone); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $dataplexServiceClient->resumeOperation($operationName, 'updateZone'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $dataplexServiceClient->close(); - * } - * ``` - * - * @param FieldMask $updateMask Required. Mask of fields to update. - * @param Zone $zone Required. Update description. - * Only fields specified in `update_mask` are updated. - * @param array $optionalArgs { - * Optional. - * - * @type bool $validateOnly - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function updateZone($updateMask, $zone, array $optionalArgs = []) - { - $request = new UpdateZoneRequest(); - $requestParamHeaders = []; - $request->setUpdateMask($updateMask); - $request->setZone($zone); - $requestParamHeaders['zone.name'] = $zone->getName(); - if (isset($optionalArgs['validateOnly'])) { - $request->setValidateOnly($optionalArgs['validateOnly']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('UpdateZone', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Gets the access control policy for a resource. Returns an empty policy - if the resource exists and does not have a policy set. - * - * Sample code: - * ``` - * $dataplexServiceClient = new DataplexServiceClient(); - * try { - * $resource = 'resource'; - * $response = $dataplexServiceClient->getIamPolicy($resource); - * } finally { - * $dataplexServiceClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy is being requested. - * See the operation documentation for the appropriate value for this field. - * @param array $optionalArgs { - * Optional. - * - * @type GetPolicyOptions $options - * OPTIONAL: A `GetPolicyOptions` object for specifying options to - * `GetIamPolicy`. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Iam\V1\Policy - * - * @throws ApiException if the remote call fails - */ - public function getIamPolicy($resource, array $optionalArgs = []) - { - $request = new GetIamPolicyRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $requestParamHeaders['resource'] = $resource; - if (isset($optionalArgs['options'])) { - $request->setOptions($optionalArgs['options']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetIamPolicy', Policy::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait(); - } - - /** - * Sets the access control policy on the specified resource. Replaces - any existing policy. - - Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` - errors. - * - * Sample code: - * ``` - * $dataplexServiceClient = new DataplexServiceClient(); - * try { - * $resource = 'resource'; - * $policy = new Policy(); - * $response = $dataplexServiceClient->setIamPolicy($resource, $policy); - * } finally { - * $dataplexServiceClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy is being specified. - * See the operation documentation for the appropriate value for this field. - * @param Policy $policy REQUIRED: The complete policy to be applied to the `resource`. The size of - * the policy is limited to a few 10s of KB. An empty policy is a - * valid policy but certain Cloud Platform services (such as Projects) - * might reject them. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - * the fields in the mask will be modified. If no mask is provided, the - * following default mask is used: - * - * `paths: "bindings, etag"` - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Iam\V1\Policy - * - * @throws ApiException if the remote call fails - */ - public function setIamPolicy($resource, $policy, array $optionalArgs = []) - { - $request = new SetIamPolicyRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $request->setPolicy($policy); - $requestParamHeaders['resource'] = $resource; - if (isset($optionalArgs['updateMask'])) { - $request->setUpdateMask($optionalArgs['updateMask']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('SetIamPolicy', Policy::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait(); - } - - /** - * Returns permissions that a caller has on the specified resource. If the - resource does not exist, this will return an empty set of - permissions, not a `NOT_FOUND` error. - - Note: This operation is designed to be used for building - permission-aware UIs and command-line tools, not for authorization - checking. This operation may "fail open" without warning. - * - * Sample code: - * ``` - * $dataplexServiceClient = new DataplexServiceClient(); - * try { - * $resource = 'resource'; - * $permissions = []; - * $response = $dataplexServiceClient->testIamPermissions($resource, $permissions); - * } finally { - * $dataplexServiceClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy detail is being requested. - * See the operation documentation for the appropriate value for this field. - * @param string[] $permissions The set of permissions to check for the `resource`. Permissions with - * wildcards (such as '*' or 'storage.*') are not allowed. For more - * information see - * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Iam\V1\TestIamPermissionsResponse - * - * @throws ApiException if the remote call fails - */ - public function testIamPermissions($resource, $permissions, array $optionalArgs = []) - { - $request = new TestIamPermissionsRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $request->setPermissions($permissions); - $requestParamHeaders['resource'] = $resource; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('TestIamPermissions', TestIamPermissionsResponse::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait(); - } - - /** - * Gets information about a location. - * - * Sample code: - * ``` - * $dataplexServiceClient = new DataplexServiceClient(); - * try { - * $response = $dataplexServiceClient->getLocation(); - * } finally { - * $dataplexServiceClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * Resource name for the location. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Location\Location - * - * @throws ApiException if the remote call fails - */ - public function getLocation(array $optionalArgs = []) - { - $request = new GetLocationRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - $requestParamHeaders['name'] = $optionalArgs['name']; - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetLocation', Location::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.cloud.location.Locations')->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * Sample code: - * ``` - * $dataplexServiceClient = new DataplexServiceClient(); - * try { - * // Iterate over pages of elements - * $pagedResponse = $dataplexServiceClient->listLocations(); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $dataplexServiceClient->listLocations(); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $dataplexServiceClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * The resource that owns the locations collection, if applicable. - * @type string $filter - * The standard list filter. - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listLocations(array $optionalArgs = []) - { - $request = new ListLocationsRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - $requestParamHeaders['name'] = $optionalArgs['name']; - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListLocations', $optionalArgs, ListLocationsResponse::class, $request, 'google.cloud.location.Locations'); - } -} diff --git a/owl-bot-staging/Dataplex/v1/src/V1/Gapic/MetadataServiceGapicClient.php b/owl-bot-staging/Dataplex/v1/src/V1/Gapic/MetadataServiceGapicClient.php deleted file mode 100644 index 2e0b7f108d54..000000000000 --- a/owl-bot-staging/Dataplex/v1/src/V1/Gapic/MetadataServiceGapicClient.php +++ /dev/null @@ -1,1138 +0,0 @@ -zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); - * $entity = new Entity(); - * $response = $metadataServiceClient->createEntity($formattedParent, $entity); - * } finally { - * $metadataServiceClient->close(); - * } - * ``` - * - * Many parameters require resource names to be formatted in a particular way. To - * assist with these names, this class includes a format method for each type of - * name, and additionally a parseName method to extract the individual identifiers - * contained within formatted names that are returned by the API. - * - * @deprecated Please use the new service client {@see \Google\Cloud\Dataplex\V1\Client\MetadataServiceClient}. - */ -class MetadataServiceGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.dataplex.v1.MetadataService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - const SERVICE_ADDRESS = 'dataplex.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'dataplex.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private static $entityNameTemplate; - - private static $partitionNameTemplate; - - private static $zoneNameTemplate; - - private static $pathTemplateMap; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/metadata_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/metadata_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/metadata_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/metadata_service_rest_client_config.php', - ], - ], - ]; - } - - private static function getEntityNameTemplate() - { - if (self::$entityNameTemplate == null) { - self::$entityNameTemplate = new PathTemplate('projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}'); - } - - return self::$entityNameTemplate; - } - - private static function getPartitionNameTemplate() - { - if (self::$partitionNameTemplate == null) { - self::$partitionNameTemplate = new PathTemplate('projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}/partitions/{partition}'); - } - - return self::$partitionNameTemplate; - } - - private static function getZoneNameTemplate() - { - if (self::$zoneNameTemplate == null) { - self::$zoneNameTemplate = new PathTemplate('projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}'); - } - - return self::$zoneNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'entity' => self::getEntityNameTemplate(), - 'partition' => self::getPartitionNameTemplate(), - 'zone' => self::getZoneNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a entity - * resource. - * - * @param string $project - * @param string $location - * @param string $lake - * @param string $zone - * @param string $entity - * - * @return string The formatted entity resource. - */ - public static function entityName($project, $location, $lake, $zone, $entity) - { - return self::getEntityNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'lake' => $lake, - 'zone' => $zone, - 'entity' => $entity, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a partition - * resource. - * - * @param string $project - * @param string $location - * @param string $lake - * @param string $zone - * @param string $entity - * @param string $partition - * - * @return string The formatted partition resource. - */ - public static function partitionName($project, $location, $lake, $zone, $entity, $partition) - { - return self::getPartitionNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'lake' => $lake, - 'zone' => $zone, - 'entity' => $entity, - 'partition' => $partition, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a zone - * resource. - * - * @param string $project - * @param string $location - * @param string $lake - * @param string $zone - * - * @return string The formatted zone resource. - */ - public static function zoneName($project, $location, $lake, $zone) - { - return self::getZoneNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'lake' => $lake, - 'zone' => $zone, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - entity: projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity} - * - partition: projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}/partitions/{partition} - * - zone: projects/{project}/locations/{location}/lakes/{lake}/zones/{zone} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName($formattedName, $template = null) - { - $templateMap = self::getPathTemplateMap(); - if ($template) { - if (!isset($templateMap[$template])) { - throw new ValidationException("Template name $template does not exist"); - } - - return $templateMap[$template]->match($formattedName); - } - - foreach ($templateMap as $templateName => $pathTemplate) { - try { - return $pathTemplate->match($formattedName); - } catch (ValidationException $ex) { - // Swallow the exception to continue trying other path templates - } - } - - throw new ValidationException("Input did not match any known format. Input: $formattedName"); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'dataplex.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** - * Create a metadata entity. - * - * Sample code: - * ``` - * $metadataServiceClient = new MetadataServiceClient(); - * try { - * $formattedParent = $metadataServiceClient->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); - * $entity = new Entity(); - * $response = $metadataServiceClient->createEntity($formattedParent, $entity); - * } finally { - * $metadataServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * @param Entity $entity Required. Entity resource. - * @param array $optionalArgs { - * Optional. - * - * @type bool $validateOnly - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Dataplex\V1\Entity - * - * @throws ApiException if the remote call fails - */ - public function createEntity($parent, $entity, array $optionalArgs = []) - { - $request = new CreateEntityRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setEntity($entity); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['validateOnly'])) { - $request->setValidateOnly($optionalArgs['validateOnly']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateEntity', Entity::class, $optionalArgs, $request)->wait(); - } - - /** - * Create a metadata partition. - * - * Sample code: - * ``` - * $metadataServiceClient = new MetadataServiceClient(); - * try { - * $formattedParent = $metadataServiceClient->entityName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ENTITY]'); - * $partition = new Partition(); - * $response = $metadataServiceClient->createPartition($formattedParent, $partition); - * } finally { - * $metadataServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. - * @param Partition $partition Required. Partition resource. - * @param array $optionalArgs { - * Optional. - * - * @type bool $validateOnly - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Dataplex\V1\Partition - * - * @throws ApiException if the remote call fails - */ - public function createPartition($parent, $partition, array $optionalArgs = []) - { - $request = new CreatePartitionRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setPartition($partition); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['validateOnly'])) { - $request->setValidateOnly($optionalArgs['validateOnly']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreatePartition', Partition::class, $optionalArgs, $request)->wait(); - } - - /** - * Delete a metadata entity. - * - * Sample code: - * ``` - * $metadataServiceClient = new MetadataServiceClient(); - * try { - * $formattedName = $metadataServiceClient->entityName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ENTITY]'); - * $etag = 'etag'; - * $metadataServiceClient->deleteEntity($formattedName, $etag); - * } finally { - * $metadataServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the entity: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. - * @param string $etag Required. The etag associated with the entity, which can be retrieved with - * a [GetEntity][] request. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - */ - public function deleteEntity($name, $etag, array $optionalArgs = []) - { - $request = new DeleteEntityRequest(); - $requestParamHeaders = []; - $request->setName($name); - $request->setEtag($etag); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteEntity', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Delete a metadata partition. - * - * Sample code: - * ``` - * $metadataServiceClient = new MetadataServiceClient(); - * try { - * $formattedName = $metadataServiceClient->partitionName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ENTITY]', '[PARTITION]'); - * $metadataServiceClient->deletePartition($formattedName); - * } finally { - * $metadataServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the partition. - * format: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_value_path}`. - * The {partition_value_path} segment consists of an ordered sequence of - * partition values separated by "/". All values must be provided. - * @param array $optionalArgs { - * Optional. - * - * @type string $etag - * Optional. The etag associated with the partition. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - */ - public function deletePartition($name, array $optionalArgs = []) - { - $request = new DeletePartitionRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['etag'])) { - $request->setEtag($optionalArgs['etag']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeletePartition', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Get a metadata entity. - * - * Sample code: - * ``` - * $metadataServiceClient = new MetadataServiceClient(); - * try { - * $formattedName = $metadataServiceClient->entityName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ENTITY]'); - * $response = $metadataServiceClient->getEntity($formattedName); - * } finally { - * $metadataServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the entity: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}.` - * @param array $optionalArgs { - * Optional. - * - * @type int $view - * Optional. Used to select the subset of entity information to return. - * Defaults to `BASIC`. - * For allowed values, use constants defined on {@see \Google\Cloud\Dataplex\V1\GetEntityRequest\EntityView} - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Dataplex\V1\Entity - * - * @throws ApiException if the remote call fails - */ - public function getEntity($name, array $optionalArgs = []) - { - $request = new GetEntityRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['view'])) { - $request->setView($optionalArgs['view']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetEntity', Entity::class, $optionalArgs, $request)->wait(); - } - - /** - * Get a metadata partition of an entity. - * - * Sample code: - * ``` - * $metadataServiceClient = new MetadataServiceClient(); - * try { - * $formattedName = $metadataServiceClient->partitionName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ENTITY]', '[PARTITION]'); - * $response = $metadataServiceClient->getPartition($formattedName); - * } finally { - * $metadataServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the partition: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_value_path}`. - * The {partition_value_path} segment consists of an ordered sequence of - * partition values separated by "/". All values must be provided. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Dataplex\V1\Partition - * - * @throws ApiException if the remote call fails - */ - public function getPartition($name, array $optionalArgs = []) - { - $request = new GetPartitionRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetPartition', Partition::class, $optionalArgs, $request)->wait(); - } - - /** - * List metadata entities in a zone. - * - * Sample code: - * ``` - * $metadataServiceClient = new MetadataServiceClient(); - * try { - * $formattedParent = $metadataServiceClient->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); - * $view = EntityView::ENTITY_VIEW_UNSPECIFIED; - * // Iterate over pages of elements - * $pagedResponse = $metadataServiceClient->listEntities($formattedParent, $view); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $metadataServiceClient->listEntities($formattedParent, $view); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $metadataServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the parent zone: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. - * @param int $view Required. Specify the entity view to make a partial list request. - * For allowed values, use constants defined on {@see \Google\Cloud\Dataplex\V1\ListEntitiesRequest\EntityView} - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type string $filter - * Optional. The following filter parameters can be added to the URL to limit - * the entities returned by the API: - * - * - Entity ID: ?filter="id=entityID" - * - Asset ID: ?filter="asset=assetID" - * - Data path ?filter="data_path=gs://my-bucket" - * - Is HIVE compatible: ?filter="hive_compatible=true" - * - Is BigQuery compatible: ?filter="bigquery_compatible=true" - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listEntities($parent, $view, array $optionalArgs = []) - { - $request = new ListEntitiesRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setView($view); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListEntities', $optionalArgs, ListEntitiesResponse::class, $request); - } - - /** - * List metadata partitions of an entity. - * - * Sample code: - * ``` - * $metadataServiceClient = new MetadataServiceClient(); - * try { - * $formattedParent = $metadataServiceClient->entityName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ENTITY]'); - * // Iterate over pages of elements - * $pagedResponse = $metadataServiceClient->listPartitions($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $metadataServiceClient->listPartitions($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $metadataServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the parent entity: - * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`. - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type string $filter - * Optional. Filter the partitions returned to the caller using a key value - * pair expression. Supported operators and syntax: - * - * - logic operators: AND, OR - * - comparison operators: <, >, >=, <= ,=, != - * - LIKE operators: - * - The right hand of a LIKE operator supports "." and - * "*" for wildcard searches, for example "value1 LIKE ".*oo.*" - * - parenthetical grouping: ( ) - * - * Sample filter expression: `?filter="key1 < value1 OR key2 > value2" - * - * **Notes:** - * - * - Keys to the left of operators are case insensitive. - * - Partition results are sorted first by creation time, then by - * lexicographic order. - * - Up to 20 key value filter pairs are allowed, but due to performance - * considerations, only the first 10 will be used as a filter. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listPartitions($parent, array $optionalArgs = []) - { - $request = new ListPartitionsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListPartitions', $optionalArgs, ListPartitionsResponse::class, $request); - } - - /** - * Update a metadata entity. Only supports full resource update. - * - * Sample code: - * ``` - * $metadataServiceClient = new MetadataServiceClient(); - * try { - * $entity = new Entity(); - * $response = $metadataServiceClient->updateEntity($entity); - * } finally { - * $metadataServiceClient->close(); - * } - * ``` - * - * @param Entity $entity Required. Update description. - * @param array $optionalArgs { - * Optional. - * - * @type bool $validateOnly - * Optional. Only validate the request, but do not perform mutations. - * The default is false. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Dataplex\V1\Entity - * - * @throws ApiException if the remote call fails - */ - public function updateEntity($entity, array $optionalArgs = []) - { - $request = new UpdateEntityRequest(); - $requestParamHeaders = []; - $request->setEntity($entity); - $requestParamHeaders['entity.name'] = $entity->getName(); - if (isset($optionalArgs['validateOnly'])) { - $request->setValidateOnly($optionalArgs['validateOnly']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateEntity', Entity::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets the access control policy for a resource. Returns an empty policy - if the resource exists and does not have a policy set. - * - * Sample code: - * ``` - * $metadataServiceClient = new MetadataServiceClient(); - * try { - * $resource = 'resource'; - * $response = $metadataServiceClient->getIamPolicy($resource); - * } finally { - * $metadataServiceClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy is being requested. - * See the operation documentation for the appropriate value for this field. - * @param array $optionalArgs { - * Optional. - * - * @type GetPolicyOptions $options - * OPTIONAL: A `GetPolicyOptions` object for specifying options to - * `GetIamPolicy`. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Iam\V1\Policy - * - * @throws ApiException if the remote call fails - */ - public function getIamPolicy($resource, array $optionalArgs = []) - { - $request = new GetIamPolicyRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $requestParamHeaders['resource'] = $resource; - if (isset($optionalArgs['options'])) { - $request->setOptions($optionalArgs['options']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetIamPolicy', Policy::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait(); - } - - /** - * Sets the access control policy on the specified resource. Replaces - any existing policy. - - Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` - errors. - * - * Sample code: - * ``` - * $metadataServiceClient = new MetadataServiceClient(); - * try { - * $resource = 'resource'; - * $policy = new Policy(); - * $response = $metadataServiceClient->setIamPolicy($resource, $policy); - * } finally { - * $metadataServiceClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy is being specified. - * See the operation documentation for the appropriate value for this field. - * @param Policy $policy REQUIRED: The complete policy to be applied to the `resource`. The size of - * the policy is limited to a few 10s of KB. An empty policy is a - * valid policy but certain Cloud Platform services (such as Projects) - * might reject them. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - * the fields in the mask will be modified. If no mask is provided, the - * following default mask is used: - * - * `paths: "bindings, etag"` - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Iam\V1\Policy - * - * @throws ApiException if the remote call fails - */ - public function setIamPolicy($resource, $policy, array $optionalArgs = []) - { - $request = new SetIamPolicyRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $request->setPolicy($policy); - $requestParamHeaders['resource'] = $resource; - if (isset($optionalArgs['updateMask'])) { - $request->setUpdateMask($optionalArgs['updateMask']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('SetIamPolicy', Policy::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait(); - } - - /** - * Returns permissions that a caller has on the specified resource. If the - resource does not exist, this will return an empty set of - permissions, not a `NOT_FOUND` error. - - Note: This operation is designed to be used for building - permission-aware UIs and command-line tools, not for authorization - checking. This operation may "fail open" without warning. - * - * Sample code: - * ``` - * $metadataServiceClient = new MetadataServiceClient(); - * try { - * $resource = 'resource'; - * $permissions = []; - * $response = $metadataServiceClient->testIamPermissions($resource, $permissions); - * } finally { - * $metadataServiceClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy detail is being requested. - * See the operation documentation for the appropriate value for this field. - * @param string[] $permissions The set of permissions to check for the `resource`. Permissions with - * wildcards (such as '*' or 'storage.*') are not allowed. For more - * information see - * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Iam\V1\TestIamPermissionsResponse - * - * @throws ApiException if the remote call fails - */ - public function testIamPermissions($resource, $permissions, array $optionalArgs = []) - { - $request = new TestIamPermissionsRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $request->setPermissions($permissions); - $requestParamHeaders['resource'] = $resource; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('TestIamPermissions', TestIamPermissionsResponse::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait(); - } - - /** - * Gets information about a location. - * - * Sample code: - * ``` - * $metadataServiceClient = new MetadataServiceClient(); - * try { - * $response = $metadataServiceClient->getLocation(); - * } finally { - * $metadataServiceClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * Resource name for the location. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Location\Location - * - * @throws ApiException if the remote call fails - */ - public function getLocation(array $optionalArgs = []) - { - $request = new GetLocationRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - $requestParamHeaders['name'] = $optionalArgs['name']; - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetLocation', Location::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.cloud.location.Locations')->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * Sample code: - * ``` - * $metadataServiceClient = new MetadataServiceClient(); - * try { - * // Iterate over pages of elements - * $pagedResponse = $metadataServiceClient->listLocations(); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $metadataServiceClient->listLocations(); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $metadataServiceClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * The resource that owns the locations collection, if applicable. - * @type string $filter - * The standard list filter. - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listLocations(array $optionalArgs = []) - { - $request = new ListLocationsRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - $requestParamHeaders['name'] = $optionalArgs['name']; - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListLocations', $optionalArgs, ListLocationsResponse::class, $request, 'google.cloud.location.Locations'); - } -} diff --git a/owl-bot-staging/Dataplex/v1/src/V1/MetadataServiceClient.php b/owl-bot-staging/Dataplex/v1/src/V1/MetadataServiceClient.php deleted file mode 100644 index 12837f50908d..000000000000 --- a/owl-bot-staging/Dataplex/v1/src/V1/MetadataServiceClient.php +++ /dev/null @@ -1,34 +0,0 @@ - [ - 'google.cloud.dataplex.v1.CatalogService' => [ - 'CreateAspectType' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Dataplex\V1\AspectType', - 'metadataReturnType' => '\Google\Cloud\Dataplex\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateEntryGroup' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Dataplex\V1\EntryGroup', - 'metadataReturnType' => '\Google\Cloud\Dataplex\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateEntryType' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Dataplex\V1\EntryType', - 'metadataReturnType' => '\Google\Cloud\Dataplex\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteAspectType' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Dataplex\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteEntryGroup' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Dataplex\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteEntryType' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Dataplex\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateAspectType' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Dataplex\V1\AspectType', - 'metadataReturnType' => '\Google\Cloud\Dataplex\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'aspect_type.name', - 'fieldAccessors' => [ - 'getAspectType', - 'getName', - ], - ], - ], - ], - 'UpdateEntryGroup' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Dataplex\V1\EntryGroup', - 'metadataReturnType' => '\Google\Cloud\Dataplex\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'entry_group.name', - 'fieldAccessors' => [ - 'getEntryGroup', - 'getName', - ], - ], - ], - ], - 'UpdateEntryType' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Dataplex\V1\EntryType', - 'metadataReturnType' => '\Google\Cloud\Dataplex\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'entry_type.name', - 'fieldAccessors' => [ - 'getEntryType', - 'getName', - ], - ], - ], - ], - 'CreateEntry' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\Entry', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteEntry' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\Entry', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetAspectType' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\AspectType', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetEntry' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\Entry', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetEntryGroup' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\EntryGroup', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetEntryType' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\EntryType', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListAspectTypes' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getAspectTypes', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\ListAspectTypesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListEntries' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getEntries', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\ListEntriesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListEntryGroups' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getEntryGroups', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\ListEntryGroupsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListEntryTypes' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getEntryTypes', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\ListEntryTypesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'LookupEntry' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\Entry', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'SearchEntries' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getResults', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\SearchEntriesResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateEntry' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\Entry', - 'headerParams' => [ - [ - 'keyName' => 'entry.name', - 'fieldAccessors' => [ - 'getEntry', - 'getName', - ], - ], - ], - ], - 'GetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'SetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'TestIamPermissions' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'GetLocation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Location\Location', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'templateMap' => [ - 'aspectType' => 'projects/{project}/locations/{location}/aspectTypes/{aspect_type}', - 'entry' => 'projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}', - 'entryGroup' => 'projects/{project}/locations/{location}/entryGroups/{entry_group}', - 'entryType' => 'projects/{project}/locations/{location}/entryTypes/{entry_type}', - 'location' => 'projects/{project}/locations/{location}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Dataplex/v1/src/V1/resources/catalog_service_rest_client_config.php b/owl-bot-staging/Dataplex/v1/src/V1/resources/catalog_service_rest_client_config.php deleted file mode 100644 index 162e126e7aca..000000000000 --- a/owl-bot-staging/Dataplex/v1/src/V1/resources/catalog_service_rest_client_config.php +++ /dev/null @@ -1,586 +0,0 @@ - [ - 'google.cloud.dataplex.v1.CatalogService' => [ - 'CreateAspectType' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/aspectTypes', - 'body' => 'aspect_type', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'aspect_type_id', - ], - ], - 'CreateEntry' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/entryGroups/*}/entries', - 'body' => 'entry', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'entry_id', - ], - ], - 'CreateEntryGroup' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/entryGroups', - 'body' => 'entry_group', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'entry_group_id', - ], - ], - 'CreateEntryType' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/entryTypes', - 'body' => 'entry_type', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'entry_type_id', - ], - ], - 'DeleteAspectType' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/aspectTypes/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteEntry' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/entryGroups/*/entries/**}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteEntryGroup' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/entryGroups/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteEntryType' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/entryTypes/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetAspectType' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/aspectTypes/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetEntry' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/entryGroups/*/entries/**}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetEntryGroup' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/entryGroups/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetEntryType' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/entryTypes/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListAspectTypes' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/aspectTypes', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListEntries' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/entryGroups/*}/entries', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListEntryGroups' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/entryGroups', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListEntryTypes' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/entryTypes', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'LookupEntry' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}:lookupEntry', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'SearchEntries' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}:searchEntries', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'UpdateAspectType' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{aspect_type.name=projects/*/locations/*/aspectTypes/*}', - 'body' => 'aspect_type', - 'placeholders' => [ - 'aspect_type.name' => [ - 'getters' => [ - 'getAspectType', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateEntry' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{entry.name=projects/*/locations/*/entryGroups/*/entries/**}', - 'body' => 'entry', - 'placeholders' => [ - 'entry.name' => [ - 'getters' => [ - 'getEntry', - 'getName', - ], - ], - ], - ], - 'UpdateEntryGroup' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{entry_group.name=projects/*/locations/*/entryGroups/*}', - 'body' => 'entry_group', - 'placeholders' => [ - 'entry_group.name' => [ - 'getters' => [ - 'getEntryGroup', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateEntryType' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{entry_type.name=projects/*/locations/*/entryTypes/*}', - 'body' => 'entry_type', - 'placeholders' => [ - 'entry_type.name' => [ - 'getters' => [ - 'getEntryType', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - ], - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.iam.v1.IAMPolicy' => [ - 'GetIamPolicy' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*}:getIamPolicy', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataScans/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryTypes/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/aspectTypes/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryGroups/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/governanceRules/*}:getIamPolicy', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*}:setIamPolicy', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataScans/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryTypes/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/aspectTypes/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryGroups/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/governanceRules/*}:setIamPolicy', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*}:testIamPermissions', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataScans/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryTypes/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/aspectTypes/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryGroups/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/governanceRules/*}:testIamPermissions', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Dataplex/v1/src/V1/resources/content_service_client_config.json b/owl-bot-staging/Dataplex/v1/src/V1/resources/content_service_client_config.json deleted file mode 100644 index 481862f7b865..000000000000 --- a/owl-bot-staging/Dataplex/v1/src/V1/resources/content_service_client_config.json +++ /dev/null @@ -1,106 +0,0 @@ -{ - "interfaces": { - "google.cloud.dataplex.v1.ContentService": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_5_codes": [ - "UNAVAILABLE" - ], - "retry_policy_6_codes": [ - "UNAVAILABLE" - ], - "no_retry_3_codes": [] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "retry_policy_5_params": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 10000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - }, - "retry_policy_6_params": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 10000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - }, - "no_retry_3_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "CreateContent": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_3_codes", - "retry_params_name": "no_retry_3_params" - }, - "DeleteContent": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_3_codes", - "retry_params_name": "no_retry_3_params" - }, - "GetContent": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_5_codes", - "retry_params_name": "retry_policy_5_params" - }, - "GetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_5_codes", - "retry_params_name": "retry_policy_5_params" - }, - "ListContent": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_6_codes", - "retry_params_name": "retry_policy_6_params" - }, - "SetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_3_codes", - "retry_params_name": "no_retry_3_params" - }, - "TestIamPermissions": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_5_codes", - "retry_params_name": "retry_policy_5_params" - }, - "UpdateContent": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_3_codes", - "retry_params_name": "no_retry_3_params" - }, - "GetLocation": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListLocations": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - } - } - } - } -} diff --git a/owl-bot-staging/Dataplex/v1/src/V1/resources/content_service_descriptor_config.php b/owl-bot-staging/Dataplex/v1/src/V1/resources/content_service_descriptor_config.php deleted file mode 100644 index 29009356e98f..000000000000 --- a/owl-bot-staging/Dataplex/v1/src/V1/resources/content_service_descriptor_config.php +++ /dev/null @@ -1,171 +0,0 @@ - [ - 'google.cloud.dataplex.v1.ContentService' => [ - 'CreateContent' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\Content', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteContent' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetContent' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\Content', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - ], - 'ListContent' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getContent', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\ListContentResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - ], - 'UpdateContent' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\Content', - 'headerParams' => [ - [ - 'keyName' => 'content.name', - 'fieldAccessors' => [ - 'getContent', - 'getName', - ], - ], - ], - ], - 'GetLocation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Location\Location', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'templateMap' => [ - 'content' => 'projects/{project}/locations/{location}/lakes/{lake}/content/{content}', - 'lake' => 'projects/{project}/locations/{location}/lakes/{lake}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Dataplex/v1/src/V1/resources/content_service_rest_client_config.php b/owl-bot-staging/Dataplex/v1/src/V1/resources/content_service_rest_client_config.php deleted file mode 100644 index 0dcaf936b334..000000000000 --- a/owl-bot-staging/Dataplex/v1/src/V1/resources/content_service_rest_client_config.php +++ /dev/null @@ -1,462 +0,0 @@ - [ - 'google.cloud.dataplex.v1.ContentService' => [ - 'CreateContent' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/lakes/*}/contentitems', - 'body' => 'content', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/lakes/*}/content', - 'body' => 'content', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteContent' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/lakes/*/contentitems/**}', - 'additionalBindings' => [ - [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/lakes/*/content/**}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetContent' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/lakes/*/contentitems/**}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/lakes/*/content/**}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetIamPolicy' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/contentitems/**}:getIamPolicy', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/content/**}:getIamPolicy', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'ListContent' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/lakes/*}/contentitems', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/lakes/*}/content', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/contentitems/**}:setIamPolicy', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/content/**}:setIamPolicy', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/contentitems/**}:testIamPermissions', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/content/**}:testIamPermissions', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'UpdateContent' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{content.name=projects/*/locations/*/lakes/*/contentitems/**}', - 'body' => 'content', - 'additionalBindings' => [ - [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{content.name=projects/*/locations/*/lakes/*/content/**}', - 'body' => 'content', - 'queryParams' => [ - 'update_mask', - ], - ], - ], - 'placeholders' => [ - 'content.name' => [ - 'getters' => [ - 'getContent', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - ], - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.iam.v1.IAMPolicy' => [ - 'GetIamPolicy' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*}:getIamPolicy', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataScans/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryTypes/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/aspectTypes/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryGroups/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/governanceRules/*}:getIamPolicy', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*}:setIamPolicy', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataScans/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryTypes/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/aspectTypes/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryGroups/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/governanceRules/*}:setIamPolicy', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*}:testIamPermissions', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataScans/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryTypes/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/aspectTypes/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryGroups/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/governanceRules/*}:testIamPermissions', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Dataplex/v1/src/V1/resources/data_scan_service_client_config.json b/owl-bot-staging/Dataplex/v1/src/V1/resources/data_scan_service_client_config.json deleted file mode 100644 index 76afb244517b..000000000000 --- a/owl-bot-staging/Dataplex/v1/src/V1/resources/data_scan_service_client_config.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "interfaces": { - "google.cloud.dataplex.v1.DataScanService": { - "retry_codes": { - "no_retry_codes": [] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - } - }, - "methods": { - "CreateDataScan": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "DeleteDataScan": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GenerateDataQualityRules": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetDataScan": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetDataScanJob": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListDataScanJobs": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListDataScans": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "RunDataScan": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "UpdateDataScan": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "SetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "TestIamPermissions": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetLocation": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListLocations": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - } - } - } - } -} diff --git a/owl-bot-staging/Dataplex/v1/src/V1/resources/data_scan_service_descriptor_config.php b/owl-bot-staging/Dataplex/v1/src/V1/resources/data_scan_service_descriptor_config.php deleted file mode 100644 index 124541dc6289..000000000000 --- a/owl-bot-staging/Dataplex/v1/src/V1/resources/data_scan_service_descriptor_config.php +++ /dev/null @@ -1,253 +0,0 @@ - [ - 'google.cloud.dataplex.v1.DataScanService' => [ - 'CreateDataScan' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Dataplex\V1\DataScan', - 'metadataReturnType' => '\Google\Cloud\Dataplex\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteDataScan' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Dataplex\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateDataScan' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Dataplex\V1\DataScan', - 'metadataReturnType' => '\Google\Cloud\Dataplex\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'data_scan.name', - 'fieldAccessors' => [ - 'getDataScan', - 'getName', - ], - ], - ], - ], - 'GenerateDataQualityRules' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\GenerateDataQualityRulesResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetDataScan' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\DataScan', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetDataScanJob' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\DataScanJob', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListDataScanJobs' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getDataScanJobs', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\ListDataScanJobsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListDataScans' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getDataScans', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\ListDataScansResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'RunDataScan' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\RunDataScanResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'SetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'TestIamPermissions' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'GetLocation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Location\Location', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'templateMap' => [ - 'dataScan' => 'projects/{project}/locations/{location}/dataScans/{dataScan}', - 'dataScanJob' => 'projects/{project}/locations/{location}/dataScans/{dataScan}/jobs/{job}', - 'entity' => 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}', - 'location' => 'projects/{project}/locations/{location}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Dataplex/v1/src/V1/resources/data_scan_service_rest_client_config.php b/owl-bot-staging/Dataplex/v1/src/V1/resources/data_scan_service_rest_client_config.php deleted file mode 100644 index 88c14e05728b..000000000000 --- a/owl-bot-staging/Dataplex/v1/src/V1/resources/data_scan_service_rest_client_config.php +++ /dev/null @@ -1,428 +0,0 @@ - [ - 'google.cloud.dataplex.v1.DataScanService' => [ - 'CreateDataScan' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/dataScans', - 'body' => 'data_scan', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'data_scan_id', - ], - ], - 'DeleteDataScan' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataScans/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GenerateDataQualityRules' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataScans/*}:generateDataQualityRules', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataScans/*/jobs/*}:generateDataQualityRules', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetDataScan' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataScans/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetDataScanJob' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataScans/*/jobs/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListDataScanJobs' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/dataScans/*}/jobs', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListDataScans' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/dataScans', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'RunDataScan' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataScans/*}:run', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'UpdateDataScan' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{data_scan.name=projects/*/locations/*/dataScans/*}', - 'body' => 'data_scan', - 'placeholders' => [ - 'data_scan.name' => [ - 'getters' => [ - 'getDataScan', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - ], - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.iam.v1.IAMPolicy' => [ - 'GetIamPolicy' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*}:getIamPolicy', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataScans/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryTypes/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/aspectTypes/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryGroups/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/governanceRules/*}:getIamPolicy', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*}:setIamPolicy', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataScans/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryTypes/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/aspectTypes/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryGroups/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/governanceRules/*}:setIamPolicy', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*}:testIamPermissions', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataScans/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryTypes/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/aspectTypes/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryGroups/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/governanceRules/*}:testIamPermissions', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Dataplex/v1/src/V1/resources/data_taxonomy_service_client_config.json b/owl-bot-staging/Dataplex/v1/src/V1/resources/data_taxonomy_service_client_config.json deleted file mode 100644 index b1b81f5e2027..000000000000 --- a/owl-bot-staging/Dataplex/v1/src/V1/resources/data_taxonomy_service_client_config.json +++ /dev/null @@ -1,122 +0,0 @@ -{ - "interfaces": { - "google.cloud.dataplex.v1.DataTaxonomyService": { - "retry_codes": { - "no_retry_codes": [] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - } - }, - "methods": { - "CreateDataAttribute": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "CreateDataAttributeBinding": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "CreateDataTaxonomy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "DeleteDataAttribute": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "DeleteDataAttributeBinding": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "DeleteDataTaxonomy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetDataAttribute": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetDataAttributeBinding": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetDataTaxonomy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListDataAttributeBindings": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListDataAttributes": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListDataTaxonomies": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "UpdateDataAttribute": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "UpdateDataAttributeBinding": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "UpdateDataTaxonomy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "SetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "TestIamPermissions": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetLocation": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListLocations": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - } - } - } - } -} diff --git a/owl-bot-staging/Dataplex/v1/src/V1/resources/data_taxonomy_service_descriptor_config.php b/owl-bot-staging/Dataplex/v1/src/V1/resources/data_taxonomy_service_descriptor_config.php deleted file mode 100644 index 4ceab622da94..000000000000 --- a/owl-bot-staging/Dataplex/v1/src/V1/resources/data_taxonomy_service_descriptor_config.php +++ /dev/null @@ -1,377 +0,0 @@ - [ - 'google.cloud.dataplex.v1.DataTaxonomyService' => [ - 'CreateDataAttribute' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Dataplex\V1\DataAttribute', - 'metadataReturnType' => '\Google\Cloud\Dataplex\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateDataAttributeBinding' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Dataplex\V1\DataAttributeBinding', - 'metadataReturnType' => '\Google\Cloud\Dataplex\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateDataTaxonomy' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Dataplex\V1\DataTaxonomy', - 'metadataReturnType' => '\Google\Cloud\Dataplex\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteDataAttribute' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Dataplex\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteDataAttributeBinding' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Dataplex\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteDataTaxonomy' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Dataplex\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateDataAttribute' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Dataplex\V1\DataAttribute', - 'metadataReturnType' => '\Google\Cloud\Dataplex\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'data_attribute.name', - 'fieldAccessors' => [ - 'getDataAttribute', - 'getName', - ], - ], - ], - ], - 'UpdateDataAttributeBinding' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Dataplex\V1\DataAttributeBinding', - 'metadataReturnType' => '\Google\Cloud\Dataplex\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'data_attribute_binding.name', - 'fieldAccessors' => [ - 'getDataAttributeBinding', - 'getName', - ], - ], - ], - ], - 'UpdateDataTaxonomy' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Dataplex\V1\DataTaxonomy', - 'metadataReturnType' => '\Google\Cloud\Dataplex\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'data_taxonomy.name', - 'fieldAccessors' => [ - 'getDataTaxonomy', - 'getName', - ], - ], - ], - ], - 'GetDataAttribute' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\DataAttribute', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetDataAttributeBinding' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\DataAttributeBinding', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetDataTaxonomy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\DataTaxonomy', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListDataAttributeBindings' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getDataAttributeBindings', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\ListDataAttributeBindingsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListDataAttributes' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getDataAttributes', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\ListDataAttributesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListDataTaxonomies' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getDataTaxonomies', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\ListDataTaxonomiesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'GetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'SetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'TestIamPermissions' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'GetLocation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Location\Location', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'templateMap' => [ - 'dataAttribute' => 'projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}', - 'dataAttributeBinding' => 'projects/{project}/locations/{location}/dataAttributeBindings/{data_attribute_binding_id}', - 'dataTaxonomy' => 'projects/{project}/locations/{location}/dataTaxonomies/{data_taxonomy_id}', - 'location' => 'projects/{project}/locations/{location}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Dataplex/v1/src/V1/resources/data_taxonomy_service_rest_client_config.php b/owl-bot-staging/Dataplex/v1/src/V1/resources/data_taxonomy_service_rest_client_config.php deleted file mode 100644 index a7177928a495..000000000000 --- a/owl-bot-staging/Dataplex/v1/src/V1/resources/data_taxonomy_service_rest_client_config.php +++ /dev/null @@ -1,506 +0,0 @@ - [ - 'google.cloud.dataplex.v1.DataTaxonomyService' => [ - 'CreateDataAttribute' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/dataTaxonomies/*}/attributes', - 'body' => 'data_attribute', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'data_attribute_id', - ], - ], - 'CreateDataAttributeBinding' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/dataAttributeBindings', - 'body' => 'data_attribute_binding', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'data_attribute_binding_id', - ], - ], - 'CreateDataTaxonomy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/dataTaxonomies', - 'body' => 'data_taxonomy', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'data_taxonomy_id', - ], - ], - 'DeleteDataAttribute' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataTaxonomies/*/attributes/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteDataAttributeBinding' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataAttributeBindings/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - 'queryParams' => [ - 'etag', - ], - ], - 'DeleteDataTaxonomy' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataTaxonomies/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetDataAttribute' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataTaxonomies/*/attributes/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetDataAttributeBinding' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataAttributeBindings/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetDataTaxonomy' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataTaxonomies/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListDataAttributeBindings' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/dataAttributeBindings', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListDataAttributes' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/dataTaxonomies/*}/attributes', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListDataTaxonomies' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/dataTaxonomies', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateDataAttribute' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{data_attribute.name=projects/*/locations/*/dataTaxonomies/*/attributes/*}', - 'body' => 'data_attribute', - 'placeholders' => [ - 'data_attribute.name' => [ - 'getters' => [ - 'getDataAttribute', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateDataAttributeBinding' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{data_attribute_binding.name=projects/*/locations/*/dataAttributeBindings/*}', - 'body' => 'data_attribute_binding', - 'placeholders' => [ - 'data_attribute_binding.name' => [ - 'getters' => [ - 'getDataAttributeBinding', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateDataTaxonomy' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{data_taxonomy.name=projects/*/locations/*/dataTaxonomies/*}', - 'body' => 'data_taxonomy', - 'placeholders' => [ - 'data_taxonomy.name' => [ - 'getters' => [ - 'getDataTaxonomy', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - ], - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.iam.v1.IAMPolicy' => [ - 'GetIamPolicy' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*}:getIamPolicy', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataScans/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryTypes/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/aspectTypes/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryGroups/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/governanceRules/*}:getIamPolicy', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*}:setIamPolicy', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataScans/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryTypes/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/aspectTypes/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryGroups/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/governanceRules/*}:setIamPolicy', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*}:testIamPermissions', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataScans/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryTypes/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/aspectTypes/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryGroups/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/governanceRules/*}:testIamPermissions', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Dataplex/v1/src/V1/resources/dataplex_service_client_config.json b/owl-bot-staging/Dataplex/v1/src/V1/resources/dataplex_service_client_config.json deleted file mode 100644 index f7ce616175a3..000000000000 --- a/owl-bot-staging/Dataplex/v1/src/V1/resources/dataplex_service_client_config.json +++ /dev/null @@ -1,246 +0,0 @@ -{ - "interfaces": { - "google.cloud.dataplex.v1.DataplexService": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE" - ], - "retry_policy_2_codes": [ - "UNAVAILABLE" - ], - "no_retry_1_codes": [] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "retry_policy_1_params": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 10000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - }, - "retry_policy_2_params": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 10000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - }, - "no_retry_1_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "CancelJob": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateAsset": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateEnvironment": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateLake": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateTask": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateZone": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteAsset": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteEnvironment": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteLake": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteTask": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteZone": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetAsset": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetEnvironment": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetJob": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetLake": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetTask": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetZone": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListAssetActions": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" - }, - "ListAssets": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" - }, - "ListEnvironments": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" - }, - "ListJobs": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" - }, - "ListLakeActions": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" - }, - "ListLakes": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" - }, - "ListSessions": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListTasks": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" - }, - "ListZoneActions": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" - }, - "ListZones": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" - }, - "RunTask": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "UpdateAsset": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateEnvironment": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateLake": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateTask": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateZone": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "SetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "TestIamPermissions": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetLocation": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListLocations": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - } - } - } - } -} diff --git a/owl-bot-staging/Dataplex/v1/src/V1/resources/dataplex_service_descriptor_config.php b/owl-bot-staging/Dataplex/v1/src/V1/resources/dataplex_service_descriptor_config.php deleted file mode 100644 index 0b939902187f..000000000000 --- a/owl-bot-staging/Dataplex/v1/src/V1/resources/dataplex_service_descriptor_config.php +++ /dev/null @@ -1,696 +0,0 @@ - [ - 'google.cloud.dataplex.v1.DataplexService' => [ - 'CreateAsset' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Dataplex\V1\Asset', - 'metadataReturnType' => '\Google\Cloud\Dataplex\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateEnvironment' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Dataplex\V1\Environment', - 'metadataReturnType' => '\Google\Cloud\Dataplex\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateLake' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Dataplex\V1\Lake', - 'metadataReturnType' => '\Google\Cloud\Dataplex\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateTask' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Dataplex\V1\Task', - 'metadataReturnType' => '\Google\Cloud\Dataplex\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateZone' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Dataplex\V1\Zone', - 'metadataReturnType' => '\Google\Cloud\Dataplex\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteAsset' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Dataplex\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteEnvironment' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Dataplex\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteLake' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Dataplex\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteTask' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Dataplex\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteZone' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Dataplex\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateAsset' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Dataplex\V1\Asset', - 'metadataReturnType' => '\Google\Cloud\Dataplex\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'asset.name', - 'fieldAccessors' => [ - 'getAsset', - 'getName', - ], - ], - ], - ], - 'UpdateEnvironment' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Dataplex\V1\Environment', - 'metadataReturnType' => '\Google\Cloud\Dataplex\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'environment.name', - 'fieldAccessors' => [ - 'getEnvironment', - 'getName', - ], - ], - ], - ], - 'UpdateLake' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Dataplex\V1\Lake', - 'metadataReturnType' => '\Google\Cloud\Dataplex\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'lake.name', - 'fieldAccessors' => [ - 'getLake', - 'getName', - ], - ], - ], - ], - 'UpdateTask' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Dataplex\V1\Task', - 'metadataReturnType' => '\Google\Cloud\Dataplex\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'task.name', - 'fieldAccessors' => [ - 'getTask', - 'getName', - ], - ], - ], - ], - 'UpdateZone' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Dataplex\V1\Zone', - 'metadataReturnType' => '\Google\Cloud\Dataplex\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'zone.name', - 'fieldAccessors' => [ - 'getZone', - 'getName', - ], - ], - ], - ], - 'CancelJob' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetAsset' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\Asset', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetEnvironment' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\Environment', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetJob' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\Job', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetLake' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\Lake', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetTask' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\Task', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetZone' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\Zone', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListAssetActions' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getActions', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\ListActionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListAssets' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getAssets', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\ListAssetsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListEnvironments' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getEnvironments', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\ListEnvironmentsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListJobs' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getJobs', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\ListJobsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListLakeActions' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getActions', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\ListActionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListLakes' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLakes', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\ListLakesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListSessions' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getSessions', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\ListSessionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListTasks' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getTasks', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\ListTasksResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListZoneActions' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getActions', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\ListActionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListZones' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getZones', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\ListZonesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'RunTask' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\RunTaskResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'SetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'TestIamPermissions' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'GetLocation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Location\Location', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'templateMap' => [ - 'asset' => 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}', - 'environment' => 'projects/{project}/locations/{location}/lakes/{lake}/environments/{environment}', - 'job' => 'projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}/jobs/{job}', - 'lake' => 'projects/{project}/locations/{location}/lakes/{lake}', - 'location' => 'projects/{project}/locations/{location}', - 'task' => 'projects/{project}/locations/{location}/lakes/{lake}/tasks/{task}', - 'zone' => 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Dataplex/v1/src/V1/resources/dataplex_service_rest_client_config.php b/owl-bot-staging/Dataplex/v1/src/V1/resources/dataplex_service_rest_client_config.php deleted file mode 100644 index e35baf81da8e..000000000000 --- a/owl-bot-staging/Dataplex/v1/src/V1/resources/dataplex_service_rest_client_config.php +++ /dev/null @@ -1,721 +0,0 @@ - [ - 'google.cloud.dataplex.v1.DataplexService' => [ - 'CancelJob' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/lakes/*/tasks/*/jobs/*}:cancel', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'CreateAsset' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/assets', - 'body' => 'asset', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'asset_id', - ], - ], - 'CreateEnvironment' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/lakes/*}/environments', - 'body' => 'environment', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'environment_id', - ], - ], - 'CreateLake' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/lakes', - 'body' => 'lake', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'lake_id', - ], - ], - 'CreateTask' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/lakes/*}/tasks', - 'body' => 'task', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'task_id', - ], - ], - 'CreateZone' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/lakes/*}/zones', - 'body' => 'zone', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'zone_id', - ], - ], - 'DeleteAsset' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/lakes/*/zones/*/assets/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteEnvironment' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/lakes/*/environments/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteLake' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/lakes/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteTask' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/lakes/*/tasks/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteZone' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/lakes/*/zones/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetAsset' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/lakes/*/zones/*/assets/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetEnvironment' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/lakes/*/environments/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetJob' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/lakes/*/tasks/*/jobs/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetLake' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/lakes/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetTask' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/lakes/*/tasks/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetZone' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/lakes/*/zones/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListAssetActions' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/lakes/*/zones/*/assets/*}/actions', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListAssets' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/assets', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListEnvironments' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/lakes/*}/environments', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListJobs' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/lakes/*/tasks/*}/jobs', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListLakeActions' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/lakes/*}/actions', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListLakes' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/lakes', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListSessions' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/lakes/*/environments/*}/sessions', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListTasks' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/lakes/*}/tasks', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListZoneActions' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/actions', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListZones' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/lakes/*}/zones', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'RunTask' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/lakes/*/tasks/*}:run', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'UpdateAsset' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{asset.name=projects/*/locations/*/lakes/*/zones/*/assets/*}', - 'body' => 'asset', - 'placeholders' => [ - 'asset.name' => [ - 'getters' => [ - 'getAsset', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateEnvironment' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{environment.name=projects/*/locations/*/lakes/*/environments/*}', - 'body' => 'environment', - 'placeholders' => [ - 'environment.name' => [ - 'getters' => [ - 'getEnvironment', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateLake' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{lake.name=projects/*/locations/*/lakes/*}', - 'body' => 'lake', - 'placeholders' => [ - 'lake.name' => [ - 'getters' => [ - 'getLake', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateTask' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{task.name=projects/*/locations/*/lakes/*/tasks/*}', - 'body' => 'task', - 'placeholders' => [ - 'task.name' => [ - 'getters' => [ - 'getTask', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateZone' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{zone.name=projects/*/locations/*/lakes/*/zones/*}', - 'body' => 'zone', - 'placeholders' => [ - 'zone.name' => [ - 'getters' => [ - 'getZone', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - ], - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.iam.v1.IAMPolicy' => [ - 'GetIamPolicy' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*}:getIamPolicy', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataScans/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryTypes/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/aspectTypes/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryGroups/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/governanceRules/*}:getIamPolicy', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*}:setIamPolicy', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataScans/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryTypes/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/aspectTypes/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryGroups/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/governanceRules/*}:setIamPolicy', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*}:testIamPermissions', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataScans/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryTypes/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/aspectTypes/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryGroups/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/governanceRules/*}:testIamPermissions', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Dataplex/v1/src/V1/resources/metadata_service_client_config.json b/owl-bot-staging/Dataplex/v1/src/V1/resources/metadata_service_client_config.json deleted file mode 100644 index d1de1dd5770a..000000000000 --- a/owl-bot-staging/Dataplex/v1/src/V1/resources/metadata_service_client_config.json +++ /dev/null @@ -1,126 +0,0 @@ -{ - "interfaces": { - "google.cloud.dataplex.v1.MetadataService": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_3_codes": [ - "UNAVAILABLE" - ], - "retry_policy_4_codes": [ - "UNAVAILABLE" - ], - "no_retry_2_codes": [] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "retry_policy_3_params": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 10000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - }, - "retry_policy_4_params": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 10000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - }, - "no_retry_2_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "CreateEntity": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - }, - "CreatePartition": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - }, - "DeleteEntity": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - }, - "DeletePartition": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - }, - "GetEntity": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params" - }, - "GetPartition": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params" - }, - "ListEntities": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_4_codes", - "retry_params_name": "retry_policy_4_params" - }, - "ListPartitions": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_4_codes", - "retry_params_name": "retry_policy_4_params" - }, - "UpdateEntity": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - }, - "GetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "SetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "TestIamPermissions": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetLocation": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListLocations": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - } - } - } - } -} diff --git a/owl-bot-staging/Dataplex/v1/src/V1/resources/metadata_service_descriptor_config.php b/owl-bot-staging/Dataplex/v1/src/V1/resources/metadata_service_descriptor_config.php deleted file mode 100644 index 3d1ec7be5b9e..000000000000 --- a/owl-bot-staging/Dataplex/v1/src/V1/resources/metadata_service_descriptor_config.php +++ /dev/null @@ -1,231 +0,0 @@ - [ - 'google.cloud.dataplex.v1.MetadataService' => [ - 'CreateEntity' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\Entity', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreatePartition' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\Partition', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteEntity' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeletePartition' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetEntity' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\Entity', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetPartition' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\Partition', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListEntities' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getEntities', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\ListEntitiesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListPartitions' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getPartitions', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\ListPartitionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateEntity' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Dataplex\V1\Entity', - 'headerParams' => [ - [ - 'keyName' => 'entity.name', - 'fieldAccessors' => [ - 'getEntity', - 'getName', - ], - ], - ], - ], - 'GetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'SetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'TestIamPermissions' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'GetLocation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Location\Location', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'templateMap' => [ - 'entity' => 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}', - 'partition' => 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity}/partitions/{partition}', - 'zone' => 'projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Dataplex/v1/src/V1/resources/metadata_service_rest_client_config.php b/owl-bot-staging/Dataplex/v1/src/V1/resources/metadata_service_rest_client_config.php deleted file mode 100644 index 30ded483e607..000000000000 --- a/owl-bot-staging/Dataplex/v1/src/V1/resources/metadata_service_rest_client_config.php +++ /dev/null @@ -1,420 +0,0 @@ - [ - 'google.cloud.dataplex.v1.MetadataService' => [ - 'CreateEntity' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/entities', - 'body' => 'entity', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreatePartition' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/lakes/*/zones/*/entities/*}/partitions', - 'body' => 'partition', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteEntity' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/lakes/*/zones/*/entities/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - 'queryParams' => [ - 'etag', - ], - ], - 'DeletePartition' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/lakes/*/zones/*/entities/*/partitions/**}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetEntity' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/lakes/*/zones/*/entities/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetPartition' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/lakes/*/zones/*/entities/*/partitions/**}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListEntities' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/entities', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'view', - ], - ], - 'ListPartitions' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/lakes/*/zones/*/entities/*}/partitions', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateEntity' => [ - 'method' => 'put', - 'uriTemplate' => '/v1/{entity.name=projects/*/locations/*/lakes/*/zones/*/entities/*}', - 'body' => 'entity', - 'placeholders' => [ - 'entity.name' => [ - 'getters' => [ - 'getEntity', - 'getName', - ], - ], - ], - ], - ], - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.iam.v1.IAMPolicy' => [ - 'GetIamPolicy' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*}:getIamPolicy', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataScans/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryTypes/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/aspectTypes/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryGroups/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/governanceRules/*}:getIamPolicy', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*}:setIamPolicy', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataScans/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryTypes/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/aspectTypes/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryGroups/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/governanceRules/*}:setIamPolicy', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*}:testIamPermissions', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/zones/*/assets/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/tasks/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/lakes/*/environments/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataScans/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataTaxonomies/*/attributes/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/dataAttributeBindings/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryTypes/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/aspectTypes/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/entryGroups/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/governanceRules/*}:testIamPermissions', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Dataplex/v1/tests/Unit/V1/CatalogServiceClientTest.php b/owl-bot-staging/Dataplex/v1/tests/Unit/V1/CatalogServiceClientTest.php deleted file mode 100644 index 2bbcc68fc578..000000000000 --- a/owl-bot-staging/Dataplex/v1/tests/Unit/V1/CatalogServiceClientTest.php +++ /dev/null @@ -1,2476 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return CatalogServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new CatalogServiceClient($options); - } - - /** @test */ - public function createAspectTypeTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createAspectTypeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $etag = 'etag3123477'; - $expectedResponse = new AspectType(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setEtag($etag); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createAspectTypeTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $aspectTypeId = 'aspectTypeId-688405671'; - $aspectType = new AspectType(); - $aspectTypeMetadataTemplate = new MetadataTemplate(); - $metadataTemplateName = 'metadataTemplateName393703156'; - $aspectTypeMetadataTemplate->setName($metadataTemplateName); - $metadataTemplateType = 'metadataTemplateType393905059'; - $aspectTypeMetadataTemplate->setType($metadataTemplateType); - $aspectType->setMetadataTemplate($aspectTypeMetadataTemplate); - $response = $gapicClient->createAspectType($formattedParent, $aspectTypeId, $aspectType); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.CatalogService/CreateAspectType', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getAspectTypeId(); - $this->assertProtobufEquals($aspectTypeId, $actualValue); - $actualValue = $actualApiRequestObject->getAspectType(); - $this->assertProtobufEquals($aspectType, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAspectTypeTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createAspectTypeExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createAspectTypeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $aspectTypeId = 'aspectTypeId-688405671'; - $aspectType = new AspectType(); - $aspectTypeMetadataTemplate = new MetadataTemplate(); - $metadataTemplateName = 'metadataTemplateName393703156'; - $aspectTypeMetadataTemplate->setName($metadataTemplateName); - $metadataTemplateType = 'metadataTemplateType393905059'; - $aspectTypeMetadataTemplate->setType($metadataTemplateType); - $aspectType->setMetadataTemplate($aspectTypeMetadataTemplate); - $response = $gapicClient->createAspectType($formattedParent, $aspectTypeId, $aspectType); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAspectTypeTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createEntryTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $entryType = 'entryType-1965312281'; - $parentEntry = 'parentEntry1393020061'; - $fullyQualifiedName = 'fullyQualifiedName338146659'; - $expectedResponse = new Entry(); - $expectedResponse->setName($name); - $expectedResponse->setEntryType($entryType); - $expectedResponse->setParentEntry($parentEntry); - $expectedResponse->setFullyQualifiedName($fullyQualifiedName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); - $entryId = 'entryId-2093663224'; - $entry = new Entry(); - $entryEntryType = 'entryEntryType884603514'; - $entry->setEntryType($entryEntryType); - $response = $gapicClient->createEntry($formattedParent, $entryId, $entry); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.CatalogService/CreateEntry', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getEntryId(); - $this->assertProtobufEquals($entryId, $actualValue); - $actualValue = $actualRequestObject->getEntry(); - $this->assertProtobufEquals($entry, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createEntryExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); - $entryId = 'entryId-2093663224'; - $entry = new Entry(); - $entryEntryType = 'entryEntryType884603514'; - $entry->setEntryType($entryEntryType); - try { - $gapicClient->createEntry($formattedParent, $entryId, $entry); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createEntryGroupTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createEntryGroupTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $etag = 'etag3123477'; - $expectedResponse = new EntryGroup(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setEtag($etag); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createEntryGroupTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $entryGroupId = 'entryGroupId-43122680'; - $entryGroup = new EntryGroup(); - $response = $gapicClient->createEntryGroup($formattedParent, $entryGroupId, $entryGroup); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.CatalogService/CreateEntryGroup', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getEntryGroupId(); - $this->assertProtobufEquals($entryGroupId, $actualValue); - $actualValue = $actualApiRequestObject->getEntryGroup(); - $this->assertProtobufEquals($entryGroup, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createEntryGroupTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createEntryGroupExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createEntryGroupTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $entryGroupId = 'entryGroupId-43122680'; - $entryGroup = new EntryGroup(); - $response = $gapicClient->createEntryGroup($formattedParent, $entryGroupId, $entryGroup); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createEntryGroupTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createEntryTypeTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createEntryTypeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $etag = 'etag3123477'; - $platform = 'platform1874684019'; - $system = 'system-887328209'; - $expectedResponse = new EntryType(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setEtag($etag); - $expectedResponse->setPlatform($platform); - $expectedResponse->setSystem($system); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createEntryTypeTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $entryTypeId = 'entryTypeId376110451'; - $entryType = new EntryType(); - $response = $gapicClient->createEntryType($formattedParent, $entryTypeId, $entryType); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.CatalogService/CreateEntryType', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getEntryTypeId(); - $this->assertProtobufEquals($entryTypeId, $actualValue); - $actualValue = $actualApiRequestObject->getEntryType(); - $this->assertProtobufEquals($entryType, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createEntryTypeTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createEntryTypeExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createEntryTypeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $entryTypeId = 'entryTypeId376110451'; - $entryType = new EntryType(); - $response = $gapicClient->createEntryType($formattedParent, $entryTypeId, $entryType); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createEntryTypeTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteAspectTypeTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteAspectTypeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteAspectTypeTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->aspectTypeName('[PROJECT]', '[LOCATION]', '[ASPECT_TYPE]'); - $response = $gapicClient->deleteAspectType($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.CatalogService/DeleteAspectType', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteAspectTypeTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteAspectTypeExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteAspectTypeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->aspectTypeName('[PROJECT]', '[LOCATION]', '[ASPECT_TYPE]'); - $response = $gapicClient->deleteAspectType($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteAspectTypeTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteEntryTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $entryType = 'entryType-1965312281'; - $parentEntry = 'parentEntry1393020061'; - $fullyQualifiedName = 'fullyQualifiedName338146659'; - $expectedResponse = new Entry(); - $expectedResponse->setName($name2); - $expectedResponse->setEntryType($entryType); - $expectedResponse->setParentEntry($parentEntry); - $expectedResponse->setFullyQualifiedName($fullyQualifiedName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); - $response = $gapicClient->deleteEntry($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.CatalogService/DeleteEntry', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteEntryExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); - try { - $gapicClient->deleteEntry($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteEntryGroupTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteEntryGroupTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteEntryGroupTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); - $response = $gapicClient->deleteEntryGroup($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.CatalogService/DeleteEntryGroup', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteEntryGroupTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteEntryGroupExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteEntryGroupTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); - $response = $gapicClient->deleteEntryGroup($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteEntryGroupTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteEntryTypeTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteEntryTypeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteEntryTypeTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->entryTypeName('[PROJECT]', '[LOCATION]', '[ENTRY_TYPE]'); - $response = $gapicClient->deleteEntryType($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.CatalogService/DeleteEntryType', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteEntryTypeTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteEntryTypeExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteEntryTypeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->entryTypeName('[PROJECT]', '[LOCATION]', '[ENTRY_TYPE]'); - $response = $gapicClient->deleteEntryType($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteEntryTypeTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getAspectTypeTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $etag = 'etag3123477'; - $expectedResponse = new AspectType(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->aspectTypeName('[PROJECT]', '[LOCATION]', '[ASPECT_TYPE]'); - $response = $gapicClient->getAspectType($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.CatalogService/GetAspectType', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAspectTypeExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->aspectTypeName('[PROJECT]', '[LOCATION]', '[ASPECT_TYPE]'); - try { - $gapicClient->getAspectType($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getEntryTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $entryType = 'entryType-1965312281'; - $parentEntry = 'parentEntry1393020061'; - $fullyQualifiedName = 'fullyQualifiedName338146659'; - $expectedResponse = new Entry(); - $expectedResponse->setName($name2); - $expectedResponse->setEntryType($entryType); - $expectedResponse->setParentEntry($parentEntry); - $expectedResponse->setFullyQualifiedName($fullyQualifiedName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); - $response = $gapicClient->getEntry($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.CatalogService/GetEntry', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getEntryExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); - try { - $gapicClient->getEntry($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getEntryGroupTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $etag = 'etag3123477'; - $expectedResponse = new EntryGroup(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); - $response = $gapicClient->getEntryGroup($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.CatalogService/GetEntryGroup', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getEntryGroupExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); - try { - $gapicClient->getEntryGroup($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getEntryTypeTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $etag = 'etag3123477'; - $platform = 'platform1874684019'; - $system = 'system-887328209'; - $expectedResponse = new EntryType(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setEtag($etag); - $expectedResponse->setPlatform($platform); - $expectedResponse->setSystem($system); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->entryTypeName('[PROJECT]', '[LOCATION]', '[ENTRY_TYPE]'); - $response = $gapicClient->getEntryType($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.CatalogService/GetEntryType', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getEntryTypeExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->entryTypeName('[PROJECT]', '[LOCATION]', '[ENTRY_TYPE]'); - try { - $gapicClient->getEntryType($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAspectTypesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $aspectTypesElement = new AspectType(); - $aspectTypes = [ - $aspectTypesElement, - ]; - $expectedResponse = new ListAspectTypesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setAspectTypes($aspectTypes); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->listAspectTypes($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getAspectTypes()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.CatalogService/ListAspectTypes', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAspectTypesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - try { - $gapicClient->listAspectTypes($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listEntriesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $entriesElement = new Entry(); - $entries = [ - $entriesElement, - ]; - $expectedResponse = new ListEntriesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setEntries($entries); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); - $response = $gapicClient->listEntries($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getEntries()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.CatalogService/ListEntries', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listEntriesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); - try { - $gapicClient->listEntries($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listEntryGroupsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $entryGroupsElement = new EntryGroup(); - $entryGroups = [ - $entryGroupsElement, - ]; - $expectedResponse = new ListEntryGroupsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setEntryGroups($entryGroups); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->listEntryGroups($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getEntryGroups()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.CatalogService/ListEntryGroups', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listEntryGroupsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - try { - $gapicClient->listEntryGroups($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listEntryTypesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $entryTypesElement = new EntryType(); - $entryTypes = [ - $entryTypesElement, - ]; - $expectedResponse = new ListEntryTypesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setEntryTypes($entryTypes); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->listEntryTypes($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getEntryTypes()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.CatalogService/ListEntryTypes', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listEntryTypesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - try { - $gapicClient->listEntryTypes($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function lookupEntryTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $entryType = 'entryType-1965312281'; - $parentEntry = 'parentEntry1393020061'; - $fullyQualifiedName = 'fullyQualifiedName338146659'; - $expectedResponse = new Entry(); - $expectedResponse->setName($name2); - $expectedResponse->setEntryType($entryType); - $expectedResponse->setParentEntry($parentEntry); - $expectedResponse->setFullyQualifiedName($fullyQualifiedName); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $formattedEntry = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); - $response = $gapicClient->lookupEntry($name, $formattedEntry); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.CatalogService/LookupEntry', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $actualValue = $actualRequestObject->getEntry(); - $this->assertProtobufEquals($formattedEntry, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function lookupEntryExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $name = 'name3373707'; - $formattedEntry = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); - try { - $gapicClient->lookupEntry($name, $formattedEntry); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function searchEntriesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $totalSize = 705419236; - $nextPageToken = ''; - $resultsElement = new SearchEntriesResult(); - $results = [ - $resultsElement, - ]; - $expectedResponse = new SearchEntriesResponse(); - $expectedResponse->setTotalSize($totalSize); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setResults($results); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $query = 'query107944136'; - $response = $gapicClient->searchEntries($name, $query); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getResults()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.CatalogService/SearchEntries', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $actualValue = $actualRequestObject->getQuery(); - $this->assertProtobufEquals($query, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function searchEntriesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $name = 'name3373707'; - $query = 'query107944136'; - try { - $gapicClient->searchEntries($name, $query); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateAspectTypeTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateAspectTypeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $etag = 'etag3123477'; - $expectedResponse = new AspectType(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setEtag($etag); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateAspectTypeTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $aspectType = new AspectType(); - $aspectTypeMetadataTemplate = new MetadataTemplate(); - $metadataTemplateName = 'metadataTemplateName393703156'; - $aspectTypeMetadataTemplate->setName($metadataTemplateName); - $metadataTemplateType = 'metadataTemplateType393905059'; - $aspectTypeMetadataTemplate->setType($metadataTemplateType); - $aspectType->setMetadataTemplate($aspectTypeMetadataTemplate); - $updateMask = new FieldMask(); - $response = $gapicClient->updateAspectType($aspectType, $updateMask); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.CatalogService/UpdateAspectType', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getAspectType(); - $this->assertProtobufEquals($aspectType, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateAspectTypeTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateAspectTypeExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateAspectTypeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $aspectType = new AspectType(); - $aspectTypeMetadataTemplate = new MetadataTemplate(); - $metadataTemplateName = 'metadataTemplateName393703156'; - $aspectTypeMetadataTemplate->setName($metadataTemplateName); - $metadataTemplateType = 'metadataTemplateType393905059'; - $aspectTypeMetadataTemplate->setType($metadataTemplateType); - $aspectType->setMetadataTemplate($aspectTypeMetadataTemplate); - $updateMask = new FieldMask(); - $response = $gapicClient->updateAspectType($aspectType, $updateMask); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateAspectTypeTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateEntryTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $entryType = 'entryType-1965312281'; - $parentEntry = 'parentEntry1393020061'; - $fullyQualifiedName = 'fullyQualifiedName338146659'; - $expectedResponse = new Entry(); - $expectedResponse->setName($name); - $expectedResponse->setEntryType($entryType); - $expectedResponse->setParentEntry($parentEntry); - $expectedResponse->setFullyQualifiedName($fullyQualifiedName); - $transport->addResponse($expectedResponse); - // Mock request - $entry = new Entry(); - $entryEntryType = 'entryEntryType884603514'; - $entry->setEntryType($entryEntryType); - $response = $gapicClient->updateEntry($entry); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.CatalogService/UpdateEntry', $actualFuncCall); - $actualValue = $actualRequestObject->getEntry(); - $this->assertProtobufEquals($entry, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateEntryExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $entry = new Entry(); - $entryEntryType = 'entryEntryType884603514'; - $entry->setEntryType($entryEntryType); - try { - $gapicClient->updateEntry($entry); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateEntryGroupTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateEntryGroupTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $etag = 'etag3123477'; - $expectedResponse = new EntryGroup(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setEtag($etag); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateEntryGroupTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $entryGroup = new EntryGroup(); - $updateMask = new FieldMask(); - $response = $gapicClient->updateEntryGroup($entryGroup, $updateMask); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.CatalogService/UpdateEntryGroup', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getEntryGroup(); - $this->assertProtobufEquals($entryGroup, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateEntryGroupTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateEntryGroupExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateEntryGroupTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $entryGroup = new EntryGroup(); - $updateMask = new FieldMask(); - $response = $gapicClient->updateEntryGroup($entryGroup, $updateMask); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateEntryGroupTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateEntryTypeTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateEntryTypeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $etag = 'etag3123477'; - $platform = 'platform1874684019'; - $system = 'system-887328209'; - $expectedResponse = new EntryType(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setEtag($etag); - $expectedResponse->setPlatform($platform); - $expectedResponse->setSystem($system); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateEntryTypeTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $entryType = new EntryType(); - $updateMask = new FieldMask(); - $response = $gapicClient->updateEntryType($entryType, $updateMask); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.CatalogService/UpdateEntryType', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getEntryType(); - $this->assertProtobufEquals($entryType, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateEntryTypeTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateEntryTypeExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateEntryTypeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $entryType = new EntryType(); - $updateMask = new FieldMask(); - $response = $gapicClient->updateEntryType($entryType, $updateMask); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateEntryTypeTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $response = $gapicClient->getIamPolicy($resource); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - try { - $gapicClient->getIamPolicy($resource); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $response = $gapicClient->setIamPolicy($resource, $policy); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPolicy(); - $this->assertProtobufEquals($policy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - try { - $gapicClient->setIamPolicy($resource, $policy); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new TestIamPermissionsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $response = $gapicClient->testIamPermissions($resource, $permissions); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPermissions(); - $this->assertProtobufEquals($permissions, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - try { - $gapicClient->testIamPermissions($resource, $permissions); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $locationId = 'locationId552319461'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Location(); - $expectedResponse->setName($name2); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - $response = $gapicClient->getLocation(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - try { - $gapicClient->getLocation(); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; - $expectedResponse = new ListLocationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLocations($locations); - $transport->addResponse($expectedResponse); - $response = $gapicClient->listLocations(); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - try { - $gapicClient->listLocations(); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Dataplex/v1/tests/Unit/V1/Client/CatalogServiceClientTest.php b/owl-bot-staging/Dataplex/v1/tests/Unit/V1/Client/CatalogServiceClientTest.php deleted file mode 100644 index d823861a7735..000000000000 --- a/owl-bot-staging/Dataplex/v1/tests/Unit/V1/Client/CatalogServiceClientTest.php +++ /dev/null @@ -1,2725 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return CatalogServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new CatalogServiceClient($options); - } - - /** @test */ - public function createAspectTypeTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createAspectTypeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $etag = 'etag3123477'; - $expectedResponse = new AspectType(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setEtag($etag); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createAspectTypeTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $aspectTypeId = 'aspectTypeId-688405671'; - $aspectType = new AspectType(); - $aspectTypeMetadataTemplate = new MetadataTemplate(); - $metadataTemplateName = 'metadataTemplateName393703156'; - $aspectTypeMetadataTemplate->setName($metadataTemplateName); - $metadataTemplateType = 'metadataTemplateType393905059'; - $aspectTypeMetadataTemplate->setType($metadataTemplateType); - $aspectType->setMetadataTemplate($aspectTypeMetadataTemplate); - $request = (new CreateAspectTypeRequest()) - ->setParent($formattedParent) - ->setAspectTypeId($aspectTypeId) - ->setAspectType($aspectType); - $response = $gapicClient->createAspectType($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.CatalogService/CreateAspectType', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getAspectTypeId(); - $this->assertProtobufEquals($aspectTypeId, $actualValue); - $actualValue = $actualApiRequestObject->getAspectType(); - $this->assertProtobufEquals($aspectType, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAspectTypeTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createAspectTypeExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createAspectTypeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $aspectTypeId = 'aspectTypeId-688405671'; - $aspectType = new AspectType(); - $aspectTypeMetadataTemplate = new MetadataTemplate(); - $metadataTemplateName = 'metadataTemplateName393703156'; - $aspectTypeMetadataTemplate->setName($metadataTemplateName); - $metadataTemplateType = 'metadataTemplateType393905059'; - $aspectTypeMetadataTemplate->setType($metadataTemplateType); - $aspectType->setMetadataTemplate($aspectTypeMetadataTemplate); - $request = (new CreateAspectTypeRequest()) - ->setParent($formattedParent) - ->setAspectTypeId($aspectTypeId) - ->setAspectType($aspectType); - $response = $gapicClient->createAspectType($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAspectTypeTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createEntryTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $entryType = 'entryType-1965312281'; - $parentEntry = 'parentEntry1393020061'; - $fullyQualifiedName = 'fullyQualifiedName338146659'; - $expectedResponse = new Entry(); - $expectedResponse->setName($name); - $expectedResponse->setEntryType($entryType); - $expectedResponse->setParentEntry($parentEntry); - $expectedResponse->setFullyQualifiedName($fullyQualifiedName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); - $entryId = 'entryId-2093663224'; - $entry = new Entry(); - $entryEntryType = 'entryEntryType884603514'; - $entry->setEntryType($entryEntryType); - $request = (new CreateEntryRequest()) - ->setParent($formattedParent) - ->setEntryId($entryId) - ->setEntry($entry); - $response = $gapicClient->createEntry($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.CatalogService/CreateEntry', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getEntryId(); - $this->assertProtobufEquals($entryId, $actualValue); - $actualValue = $actualRequestObject->getEntry(); - $this->assertProtobufEquals($entry, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createEntryExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); - $entryId = 'entryId-2093663224'; - $entry = new Entry(); - $entryEntryType = 'entryEntryType884603514'; - $entry->setEntryType($entryEntryType); - $request = (new CreateEntryRequest()) - ->setParent($formattedParent) - ->setEntryId($entryId) - ->setEntry($entry); - try { - $gapicClient->createEntry($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createEntryGroupTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createEntryGroupTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $etag = 'etag3123477'; - $expectedResponse = new EntryGroup(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setEtag($etag); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createEntryGroupTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $entryGroupId = 'entryGroupId-43122680'; - $entryGroup = new EntryGroup(); - $request = (new CreateEntryGroupRequest()) - ->setParent($formattedParent) - ->setEntryGroupId($entryGroupId) - ->setEntryGroup($entryGroup); - $response = $gapicClient->createEntryGroup($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.CatalogService/CreateEntryGroup', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getEntryGroupId(); - $this->assertProtobufEquals($entryGroupId, $actualValue); - $actualValue = $actualApiRequestObject->getEntryGroup(); - $this->assertProtobufEquals($entryGroup, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createEntryGroupTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createEntryGroupExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createEntryGroupTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $entryGroupId = 'entryGroupId-43122680'; - $entryGroup = new EntryGroup(); - $request = (new CreateEntryGroupRequest()) - ->setParent($formattedParent) - ->setEntryGroupId($entryGroupId) - ->setEntryGroup($entryGroup); - $response = $gapicClient->createEntryGroup($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createEntryGroupTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createEntryTypeTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createEntryTypeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $etag = 'etag3123477'; - $platform = 'platform1874684019'; - $system = 'system-887328209'; - $expectedResponse = new EntryType(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setEtag($etag); - $expectedResponse->setPlatform($platform); - $expectedResponse->setSystem($system); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createEntryTypeTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $entryTypeId = 'entryTypeId376110451'; - $entryType = new EntryType(); - $request = (new CreateEntryTypeRequest()) - ->setParent($formattedParent) - ->setEntryTypeId($entryTypeId) - ->setEntryType($entryType); - $response = $gapicClient->createEntryType($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.CatalogService/CreateEntryType', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getEntryTypeId(); - $this->assertProtobufEquals($entryTypeId, $actualValue); - $actualValue = $actualApiRequestObject->getEntryType(); - $this->assertProtobufEquals($entryType, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createEntryTypeTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createEntryTypeExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createEntryTypeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $entryTypeId = 'entryTypeId376110451'; - $entryType = new EntryType(); - $request = (new CreateEntryTypeRequest()) - ->setParent($formattedParent) - ->setEntryTypeId($entryTypeId) - ->setEntryType($entryType); - $response = $gapicClient->createEntryType($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createEntryTypeTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteAspectTypeTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteAspectTypeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteAspectTypeTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->aspectTypeName('[PROJECT]', '[LOCATION]', '[ASPECT_TYPE]'); - $request = (new DeleteAspectTypeRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteAspectType($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.CatalogService/DeleteAspectType', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteAspectTypeTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteAspectTypeExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteAspectTypeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->aspectTypeName('[PROJECT]', '[LOCATION]', '[ASPECT_TYPE]'); - $request = (new DeleteAspectTypeRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteAspectType($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteAspectTypeTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteEntryTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $entryType = 'entryType-1965312281'; - $parentEntry = 'parentEntry1393020061'; - $fullyQualifiedName = 'fullyQualifiedName338146659'; - $expectedResponse = new Entry(); - $expectedResponse->setName($name2); - $expectedResponse->setEntryType($entryType); - $expectedResponse->setParentEntry($parentEntry); - $expectedResponse->setFullyQualifiedName($fullyQualifiedName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); - $request = (new DeleteEntryRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteEntry($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.CatalogService/DeleteEntry', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteEntryExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); - $request = (new DeleteEntryRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteEntry($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteEntryGroupTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteEntryGroupTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteEntryGroupTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); - $request = (new DeleteEntryGroupRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteEntryGroup($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.CatalogService/DeleteEntryGroup', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteEntryGroupTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteEntryGroupExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteEntryGroupTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); - $request = (new DeleteEntryGroupRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteEntryGroup($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteEntryGroupTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteEntryTypeTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteEntryTypeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteEntryTypeTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->entryTypeName('[PROJECT]', '[LOCATION]', '[ENTRY_TYPE]'); - $request = (new DeleteEntryTypeRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteEntryType($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.CatalogService/DeleteEntryType', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteEntryTypeTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteEntryTypeExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteEntryTypeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->entryTypeName('[PROJECT]', '[LOCATION]', '[ENTRY_TYPE]'); - $request = (new DeleteEntryTypeRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteEntryType($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteEntryTypeTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getAspectTypeTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $etag = 'etag3123477'; - $expectedResponse = new AspectType(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->aspectTypeName('[PROJECT]', '[LOCATION]', '[ASPECT_TYPE]'); - $request = (new GetAspectTypeRequest()) - ->setName($formattedName); - $response = $gapicClient->getAspectType($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.CatalogService/GetAspectType', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAspectTypeExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->aspectTypeName('[PROJECT]', '[LOCATION]', '[ASPECT_TYPE]'); - $request = (new GetAspectTypeRequest()) - ->setName($formattedName); - try { - $gapicClient->getAspectType($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getEntryTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $entryType = 'entryType-1965312281'; - $parentEntry = 'parentEntry1393020061'; - $fullyQualifiedName = 'fullyQualifiedName338146659'; - $expectedResponse = new Entry(); - $expectedResponse->setName($name2); - $expectedResponse->setEntryType($entryType); - $expectedResponse->setParentEntry($parentEntry); - $expectedResponse->setFullyQualifiedName($fullyQualifiedName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); - $request = (new GetEntryRequest()) - ->setName($formattedName); - $response = $gapicClient->getEntry($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.CatalogService/GetEntry', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getEntryExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); - $request = (new GetEntryRequest()) - ->setName($formattedName); - try { - $gapicClient->getEntry($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getEntryGroupTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $etag = 'etag3123477'; - $expectedResponse = new EntryGroup(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); - $request = (new GetEntryGroupRequest()) - ->setName($formattedName); - $response = $gapicClient->getEntryGroup($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.CatalogService/GetEntryGroup', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getEntryGroupExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); - $request = (new GetEntryGroupRequest()) - ->setName($formattedName); - try { - $gapicClient->getEntryGroup($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getEntryTypeTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $etag = 'etag3123477'; - $platform = 'platform1874684019'; - $system = 'system-887328209'; - $expectedResponse = new EntryType(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setEtag($etag); - $expectedResponse->setPlatform($platform); - $expectedResponse->setSystem($system); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->entryTypeName('[PROJECT]', '[LOCATION]', '[ENTRY_TYPE]'); - $request = (new GetEntryTypeRequest()) - ->setName($formattedName); - $response = $gapicClient->getEntryType($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.CatalogService/GetEntryType', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getEntryTypeExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->entryTypeName('[PROJECT]', '[LOCATION]', '[ENTRY_TYPE]'); - $request = (new GetEntryTypeRequest()) - ->setName($formattedName); - try { - $gapicClient->getEntryType($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAspectTypesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $aspectTypesElement = new AspectType(); - $aspectTypes = [ - $aspectTypesElement, - ]; - $expectedResponse = new ListAspectTypesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setAspectTypes($aspectTypes); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListAspectTypesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listAspectTypes($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getAspectTypes()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.CatalogService/ListAspectTypes', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAspectTypesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListAspectTypesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listAspectTypes($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listEntriesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $entriesElement = new Entry(); - $entries = [ - $entriesElement, - ]; - $expectedResponse = new ListEntriesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setEntries($entries); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); - $request = (new ListEntriesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listEntries($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getEntries()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.CatalogService/ListEntries', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listEntriesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->entryGroupName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]'); - $request = (new ListEntriesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listEntries($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listEntryGroupsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $entryGroupsElement = new EntryGroup(); - $entryGroups = [ - $entryGroupsElement, - ]; - $expectedResponse = new ListEntryGroupsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setEntryGroups($entryGroups); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListEntryGroupsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listEntryGroups($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getEntryGroups()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.CatalogService/ListEntryGroups', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listEntryGroupsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListEntryGroupsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listEntryGroups($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listEntryTypesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $entryTypesElement = new EntryType(); - $entryTypes = [ - $entryTypesElement, - ]; - $expectedResponse = new ListEntryTypesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setEntryTypes($entryTypes); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListEntryTypesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listEntryTypes($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getEntryTypes()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.CatalogService/ListEntryTypes', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listEntryTypesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListEntryTypesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listEntryTypes($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function lookupEntryTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $entryType = 'entryType-1965312281'; - $parentEntry = 'parentEntry1393020061'; - $fullyQualifiedName = 'fullyQualifiedName338146659'; - $expectedResponse = new Entry(); - $expectedResponse->setName($name2); - $expectedResponse->setEntryType($entryType); - $expectedResponse->setParentEntry($parentEntry); - $expectedResponse->setFullyQualifiedName($fullyQualifiedName); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $formattedEntry = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); - $request = (new LookupEntryRequest()) - ->setName($name) - ->setEntry($formattedEntry); - $response = $gapicClient->lookupEntry($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.CatalogService/LookupEntry', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $actualValue = $actualRequestObject->getEntry(); - $this->assertProtobufEquals($formattedEntry, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function lookupEntryExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $name = 'name3373707'; - $formattedEntry = $gapicClient->entryName('[PROJECT]', '[LOCATION]', '[ENTRY_GROUP]', '[ENTRY]'); - $request = (new LookupEntryRequest()) - ->setName($name) - ->setEntry($formattedEntry); - try { - $gapicClient->lookupEntry($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function searchEntriesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $totalSize = 705419236; - $nextPageToken = ''; - $resultsElement = new SearchEntriesResult(); - $results = [ - $resultsElement, - ]; - $expectedResponse = new SearchEntriesResponse(); - $expectedResponse->setTotalSize($totalSize); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setResults($results); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $query = 'query107944136'; - $request = (new SearchEntriesRequest()) - ->setName($name) - ->setQuery($query); - $response = $gapicClient->searchEntries($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getResults()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.CatalogService/SearchEntries', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $actualValue = $actualRequestObject->getQuery(); - $this->assertProtobufEquals($query, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function searchEntriesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $name = 'name3373707'; - $query = 'query107944136'; - $request = (new SearchEntriesRequest()) - ->setName($name) - ->setQuery($query); - try { - $gapicClient->searchEntries($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateAspectTypeTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateAspectTypeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $etag = 'etag3123477'; - $expectedResponse = new AspectType(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setEtag($etag); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateAspectTypeTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $aspectType = new AspectType(); - $aspectTypeMetadataTemplate = new MetadataTemplate(); - $metadataTemplateName = 'metadataTemplateName393703156'; - $aspectTypeMetadataTemplate->setName($metadataTemplateName); - $metadataTemplateType = 'metadataTemplateType393905059'; - $aspectTypeMetadataTemplate->setType($metadataTemplateType); - $aspectType->setMetadataTemplate($aspectTypeMetadataTemplate); - $updateMask = new FieldMask(); - $request = (new UpdateAspectTypeRequest()) - ->setAspectType($aspectType) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateAspectType($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.CatalogService/UpdateAspectType', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getAspectType(); - $this->assertProtobufEquals($aspectType, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateAspectTypeTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateAspectTypeExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateAspectTypeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $aspectType = new AspectType(); - $aspectTypeMetadataTemplate = new MetadataTemplate(); - $metadataTemplateName = 'metadataTemplateName393703156'; - $aspectTypeMetadataTemplate->setName($metadataTemplateName); - $metadataTemplateType = 'metadataTemplateType393905059'; - $aspectTypeMetadataTemplate->setType($metadataTemplateType); - $aspectType->setMetadataTemplate($aspectTypeMetadataTemplate); - $updateMask = new FieldMask(); - $request = (new UpdateAspectTypeRequest()) - ->setAspectType($aspectType) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateAspectType($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateAspectTypeTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateEntryTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $entryType = 'entryType-1965312281'; - $parentEntry = 'parentEntry1393020061'; - $fullyQualifiedName = 'fullyQualifiedName338146659'; - $expectedResponse = new Entry(); - $expectedResponse->setName($name); - $expectedResponse->setEntryType($entryType); - $expectedResponse->setParentEntry($parentEntry); - $expectedResponse->setFullyQualifiedName($fullyQualifiedName); - $transport->addResponse($expectedResponse); - // Mock request - $entry = new Entry(); - $entryEntryType = 'entryEntryType884603514'; - $entry->setEntryType($entryEntryType); - $request = (new UpdateEntryRequest()) - ->setEntry($entry); - $response = $gapicClient->updateEntry($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.CatalogService/UpdateEntry', $actualFuncCall); - $actualValue = $actualRequestObject->getEntry(); - $this->assertProtobufEquals($entry, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateEntryExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $entry = new Entry(); - $entryEntryType = 'entryEntryType884603514'; - $entry->setEntryType($entryEntryType); - $request = (new UpdateEntryRequest()) - ->setEntry($entry); - try { - $gapicClient->updateEntry($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateEntryGroupTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateEntryGroupTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $etag = 'etag3123477'; - $expectedResponse = new EntryGroup(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setEtag($etag); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateEntryGroupTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $entryGroup = new EntryGroup(); - $updateMask = new FieldMask(); - $request = (new UpdateEntryGroupRequest()) - ->setEntryGroup($entryGroup) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateEntryGroup($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.CatalogService/UpdateEntryGroup', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getEntryGroup(); - $this->assertProtobufEquals($entryGroup, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateEntryGroupTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateEntryGroupExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateEntryGroupTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $entryGroup = new EntryGroup(); - $updateMask = new FieldMask(); - $request = (new UpdateEntryGroupRequest()) - ->setEntryGroup($entryGroup) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateEntryGroup($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateEntryGroupTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateEntryTypeTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateEntryTypeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $etag = 'etag3123477'; - $platform = 'platform1874684019'; - $system = 'system-887328209'; - $expectedResponse = new EntryType(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setEtag($etag); - $expectedResponse->setPlatform($platform); - $expectedResponse->setSystem($system); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateEntryTypeTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $entryType = new EntryType(); - $updateMask = new FieldMask(); - $request = (new UpdateEntryTypeRequest()) - ->setEntryType($entryType) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateEntryType($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.CatalogService/UpdateEntryType', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getEntryType(); - $this->assertProtobufEquals($entryType, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateEntryTypeTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateEntryTypeExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateEntryTypeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $entryType = new EntryType(); - $updateMask = new FieldMask(); - $request = (new UpdateEntryTypeRequest()) - ->setEntryType($entryType) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateEntryType($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateEntryTypeTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - $response = $gapicClient->getIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - try { - $gapicClient->getIamPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - $response = $gapicClient->setIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPolicy(); - $this->assertProtobufEquals($policy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - try { - $gapicClient->setIamPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new TestIamPermissionsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - $response = $gapicClient->testIamPermissions($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPermissions(); - $this->assertProtobufEquals($permissions, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - try { - $gapicClient->testIamPermissions($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $locationId = 'locationId552319461'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Location(); - $expectedResponse->setName($name2); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - $request = new GetLocationRequest(); - $response = $gapicClient->getLocation($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new GetLocationRequest(); - try { - $gapicClient->getLocation($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; - $expectedResponse = new ListLocationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLocations($locations); - $transport->addResponse($expectedResponse); - $request = new ListLocationsRequest(); - $response = $gapicClient->listLocations($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new ListLocationsRequest(); - try { - $gapicClient->listLocations($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createAspectTypeAsyncTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createAspectTypeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $etag = 'etag3123477'; - $expectedResponse = new AspectType(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setEtag($etag); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createAspectTypeTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $aspectTypeId = 'aspectTypeId-688405671'; - $aspectType = new AspectType(); - $aspectTypeMetadataTemplate = new MetadataTemplate(); - $metadataTemplateName = 'metadataTemplateName393703156'; - $aspectTypeMetadataTemplate->setName($metadataTemplateName); - $metadataTemplateType = 'metadataTemplateType393905059'; - $aspectTypeMetadataTemplate->setType($metadataTemplateType); - $aspectType->setMetadataTemplate($aspectTypeMetadataTemplate); - $request = (new CreateAspectTypeRequest()) - ->setParent($formattedParent) - ->setAspectTypeId($aspectTypeId) - ->setAspectType($aspectType); - $response = $gapicClient->createAspectTypeAsync($request)->wait(); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.CatalogService/CreateAspectType', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getAspectTypeId(); - $this->assertProtobufEquals($aspectTypeId, $actualValue); - $actualValue = $actualApiRequestObject->getAspectType(); - $this->assertProtobufEquals($aspectType, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAspectTypeTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } -} diff --git a/owl-bot-staging/Dataplex/v1/tests/Unit/V1/Client/ContentServiceClientTest.php b/owl-bot-staging/Dataplex/v1/tests/Unit/V1/Client/ContentServiceClientTest.php deleted file mode 100644 index bc205bd5071c..000000000000 --- a/owl-bot-staging/Dataplex/v1/tests/Unit/V1/Client/ContentServiceClientTest.php +++ /dev/null @@ -1,830 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return ContentServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new ContentServiceClient($options); - } - - /** @test */ - public function createContentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $uid = 'uid115792'; - $path = 'path3433509'; - $description = 'description-1724546052'; - $dataText = 'dataText-363378526'; - $expectedResponse = new Content(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setPath($path); - $expectedResponse->setDescription($description); - $expectedResponse->setDataText($dataText); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - $content = new Content(); - $contentPath = 'contentPath-389273538'; - $content->setPath($contentPath); - $contentDataText = 'contentDataText-82259056'; - $content->setDataText($contentDataText); - $request = (new CreateContentRequest()) - ->setParent($formattedParent) - ->setContent($content); - $response = $gapicClient->createContent($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.ContentService/CreateContent', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getContent(); - $this->assertProtobufEquals($content, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createContentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - $content = new Content(); - $contentPath = 'contentPath-389273538'; - $content->setPath($contentPath); - $contentDataText = 'contentDataText-82259056'; - $content->setDataText($contentDataText); - $request = (new CreateContentRequest()) - ->setParent($formattedParent) - ->setContent($content); - try { - $gapicClient->createContent($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteContentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->contentName('[PROJECT]', '[LOCATION]', '[LAKE]', '[CONTENT]'); - $request = (new DeleteContentRequest()) - ->setName($formattedName); - $gapicClient->deleteContent($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.ContentService/DeleteContent', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteContentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->contentName('[PROJECT]', '[LOCATION]', '[LAKE]', '[CONTENT]'); - $request = (new DeleteContentRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteContent($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getContentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $path = 'path3433509'; - $description = 'description-1724546052'; - $dataText = 'dataText-363378526'; - $expectedResponse = new Content(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setPath($path); - $expectedResponse->setDescription($description); - $expectedResponse->setDataText($dataText); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->contentName('[PROJECT]', '[LOCATION]', '[LAKE]', '[CONTENT]'); - $request = (new GetContentRequest()) - ->setName($formattedName); - $response = $gapicClient->getContent($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.ContentService/GetContent', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getContentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->contentName('[PROJECT]', '[LOCATION]', '[LAKE]', '[CONTENT]'); - $request = (new GetContentRequest()) - ->setName($formattedName); - try { - $gapicClient->getContent($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - $response = $gapicClient->getIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.ContentService/GetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - try { - $gapicClient->getIamPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listContentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $contentElement = new Content(); - $content = [ - $contentElement, - ]; - $expectedResponse = new ListContentResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setContent($content); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - $request = (new ListContentRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listContent($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getContent()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.ContentService/ListContent', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listContentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - $request = (new ListContentRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listContent($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - $response = $gapicClient->setIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.ContentService/SetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPolicy(); - $this->assertProtobufEquals($policy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - try { - $gapicClient->setIamPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new TestIamPermissionsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - $response = $gapicClient->testIamPermissions($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.ContentService/TestIamPermissions', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPermissions(); - $this->assertProtobufEquals($permissions, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - try { - $gapicClient->testIamPermissions($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateContentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $uid = 'uid115792'; - $path = 'path3433509'; - $description = 'description-1724546052'; - $dataText = 'dataText-363378526'; - $expectedResponse = new Content(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setPath($path); - $expectedResponse->setDescription($description); - $expectedResponse->setDataText($dataText); - $transport->addResponse($expectedResponse); - // Mock request - $updateMask = new FieldMask(); - $content = new Content(); - $contentPath = 'contentPath-389273538'; - $content->setPath($contentPath); - $contentDataText = 'contentDataText-82259056'; - $content->setDataText($contentDataText); - $request = (new UpdateContentRequest()) - ->setUpdateMask($updateMask) - ->setContent($content); - $response = $gapicClient->updateContent($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.ContentService/UpdateContent', $actualFuncCall); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualRequestObject->getContent(); - $this->assertProtobufEquals($content, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateContentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $updateMask = new FieldMask(); - $content = new Content(); - $contentPath = 'contentPath-389273538'; - $content->setPath($contentPath); - $contentDataText = 'contentDataText-82259056'; - $content->setDataText($contentDataText); - $request = (new UpdateContentRequest()) - ->setUpdateMask($updateMask) - ->setContent($content); - try { - $gapicClient->updateContent($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $locationId = 'locationId552319461'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Location(); - $expectedResponse->setName($name2); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - $request = new GetLocationRequest(); - $response = $gapicClient->getLocation($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new GetLocationRequest(); - try { - $gapicClient->getLocation($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; - $expectedResponse = new ListLocationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLocations($locations); - $transport->addResponse($expectedResponse); - $request = new ListLocationsRequest(); - $response = $gapicClient->listLocations($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new ListLocationsRequest(); - try { - $gapicClient->listLocations($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createContentAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $uid = 'uid115792'; - $path = 'path3433509'; - $description = 'description-1724546052'; - $dataText = 'dataText-363378526'; - $expectedResponse = new Content(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setPath($path); - $expectedResponse->setDescription($description); - $expectedResponse->setDataText($dataText); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - $content = new Content(); - $contentPath = 'contentPath-389273538'; - $content->setPath($contentPath); - $contentDataText = 'contentDataText-82259056'; - $content->setDataText($contentDataText); - $request = (new CreateContentRequest()) - ->setParent($formattedParent) - ->setContent($content); - $response = $gapicClient->createContentAsync($request)->wait(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.ContentService/CreateContent', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getContent(); - $this->assertProtobufEquals($content, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Dataplex/v1/tests/Unit/V1/Client/DataScanServiceClientTest.php b/owl-bot-staging/Dataplex/v1/tests/Unit/V1/Client/DataScanServiceClientTest.php deleted file mode 100644 index 87bb635c0fc9..000000000000 --- a/owl-bot-staging/Dataplex/v1/tests/Unit/V1/Client/DataScanServiceClientTest.php +++ /dev/null @@ -1,1314 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return DataScanServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new DataScanServiceClient($options); - } - - /** @test */ - public function createDataScanTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createDataScanTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $expectedResponse = new DataScan(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createDataScanTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $dataScan = new DataScan(); - $dataScanData = new DataSource(); - $dataScan->setData($dataScanData); - $dataScanId = 'dataScanId1236798088'; - $request = (new CreateDataScanRequest()) - ->setParent($formattedParent) - ->setDataScan($dataScan) - ->setDataScanId($dataScanId); - $response = $gapicClient->createDataScan($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataScanService/CreateDataScan', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getDataScan(); - $this->assertProtobufEquals($dataScan, $actualValue); - $actualValue = $actualApiRequestObject->getDataScanId(); - $this->assertProtobufEquals($dataScanId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createDataScanTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createDataScanExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createDataScanTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $dataScan = new DataScan(); - $dataScanData = new DataSource(); - $dataScan->setData($dataScanData); - $dataScanId = 'dataScanId1236798088'; - $request = (new CreateDataScanRequest()) - ->setParent($formattedParent) - ->setDataScan($dataScan) - ->setDataScanId($dataScanId); - $response = $gapicClient->createDataScan($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createDataScanTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteDataScanTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteDataScanTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteDataScanTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->dataScanName('[PROJECT]', '[LOCATION]', '[DATASCAN]'); - $request = (new DeleteDataScanRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteDataScan($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataScanService/DeleteDataScan', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteDataScanTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteDataScanExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteDataScanTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->dataScanName('[PROJECT]', '[LOCATION]', '[DATASCAN]'); - $request = (new DeleteDataScanRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteDataScan($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteDataScanTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function generateDataQualityRulesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GenerateDataQualityRulesResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $request = (new GenerateDataQualityRulesRequest()) - ->setName($name); - $response = $gapicClient->generateDataQualityRules($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataScanService/GenerateDataQualityRules', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function generateDataQualityRulesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $name = 'name3373707'; - $request = (new GenerateDataQualityRulesRequest()) - ->setName($name); - try { - $gapicClient->generateDataQualityRules($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDataScanTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $expectedResponse = new DataScan(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->dataScanName('[PROJECT]', '[LOCATION]', '[DATASCAN]'); - $request = (new GetDataScanRequest()) - ->setName($formattedName); - $response = $gapicClient->getDataScan($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataScanService/GetDataScan', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDataScanExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->dataScanName('[PROJECT]', '[LOCATION]', '[DATASCAN]'); - $request = (new GetDataScanRequest()) - ->setName($formattedName); - try { - $gapicClient->getDataScan($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDataScanJobTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $message = 'message954925063'; - $expectedResponse = new DataScanJob(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setMessage($message); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->dataScanJobName('[PROJECT]', '[LOCATION]', '[DATASCAN]', '[JOB]'); - $request = (new GetDataScanJobRequest()) - ->setName($formattedName); - $response = $gapicClient->getDataScanJob($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataScanService/GetDataScanJob', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDataScanJobExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->dataScanJobName('[PROJECT]', '[LOCATION]', '[DATASCAN]', '[JOB]'); - $request = (new GetDataScanJobRequest()) - ->setName($formattedName); - try { - $gapicClient->getDataScanJob($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDataScanJobsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $dataScanJobsElement = new DataScanJob(); - $dataScanJobs = [ - $dataScanJobsElement, - ]; - $expectedResponse = new ListDataScanJobsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setDataScanJobs($dataScanJobs); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->dataScanName('[PROJECT]', '[LOCATION]', '[DATASCAN]'); - $request = (new ListDataScanJobsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listDataScanJobs($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getDataScanJobs()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataScanService/ListDataScanJobs', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDataScanJobsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->dataScanName('[PROJECT]', '[LOCATION]', '[DATASCAN]'); - $request = (new ListDataScanJobsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listDataScanJobs($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDataScansTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $dataScansElement = new DataScan(); - $dataScans = [ - $dataScansElement, - ]; - $expectedResponse = new ListDataScansResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setDataScans($dataScans); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListDataScansRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listDataScans($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getDataScans()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataScanService/ListDataScans', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDataScansExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListDataScansRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listDataScans($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function runDataScanTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new RunDataScanResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->dataScanName('[PROJECT]', '[LOCATION]', '[DATASCAN]'); - $request = (new RunDataScanRequest()) - ->setName($formattedName); - $response = $gapicClient->runDataScan($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataScanService/RunDataScan', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function runDataScanExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->dataScanName('[PROJECT]', '[LOCATION]', '[DATASCAN]'); - $request = (new RunDataScanRequest()) - ->setName($formattedName); - try { - $gapicClient->runDataScan($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateDataScanTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateDataScanTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $expectedResponse = new DataScan(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateDataScanTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $dataScan = new DataScan(); - $dataScanData = new DataSource(); - $dataScan->setData($dataScanData); - $updateMask = new FieldMask(); - $request = (new UpdateDataScanRequest()) - ->setDataScan($dataScan) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateDataScan($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataScanService/UpdateDataScan', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getDataScan(); - $this->assertProtobufEquals($dataScan, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateDataScanTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateDataScanExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateDataScanTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $dataScan = new DataScan(); - $dataScanData = new DataSource(); - $dataScan->setData($dataScanData); - $updateMask = new FieldMask(); - $request = (new UpdateDataScanRequest()) - ->setDataScan($dataScan) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateDataScan($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateDataScanTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - $response = $gapicClient->getIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - try { - $gapicClient->getIamPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - $response = $gapicClient->setIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPolicy(); - $this->assertProtobufEquals($policy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - try { - $gapicClient->setIamPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new TestIamPermissionsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - $response = $gapicClient->testIamPermissions($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPermissions(); - $this->assertProtobufEquals($permissions, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - try { - $gapicClient->testIamPermissions($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $locationId = 'locationId552319461'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Location(); - $expectedResponse->setName($name2); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - $request = new GetLocationRequest(); - $response = $gapicClient->getLocation($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new GetLocationRequest(); - try { - $gapicClient->getLocation($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; - $expectedResponse = new ListLocationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLocations($locations); - $transport->addResponse($expectedResponse); - $request = new ListLocationsRequest(); - $response = $gapicClient->listLocations($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new ListLocationsRequest(); - try { - $gapicClient->listLocations($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createDataScanAsyncTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createDataScanTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $expectedResponse = new DataScan(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createDataScanTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $dataScan = new DataScan(); - $dataScanData = new DataSource(); - $dataScan->setData($dataScanData); - $dataScanId = 'dataScanId1236798088'; - $request = (new CreateDataScanRequest()) - ->setParent($formattedParent) - ->setDataScan($dataScan) - ->setDataScanId($dataScanId); - $response = $gapicClient->createDataScanAsync($request)->wait(); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataScanService/CreateDataScan', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getDataScan(); - $this->assertProtobufEquals($dataScan, $actualValue); - $actualValue = $actualApiRequestObject->getDataScanId(); - $this->assertProtobufEquals($dataScanId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createDataScanTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } -} diff --git a/owl-bot-staging/Dataplex/v1/tests/Unit/V1/Client/DataTaxonomyServiceClientTest.php b/owl-bot-staging/Dataplex/v1/tests/Unit/V1/Client/DataTaxonomyServiceClientTest.php deleted file mode 100644 index 82071dc5573d..000000000000 --- a/owl-bot-staging/Dataplex/v1/tests/Unit/V1/Client/DataTaxonomyServiceClientTest.php +++ /dev/null @@ -1,2183 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return DataTaxonomyServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new DataTaxonomyServiceClient($options); - } - - /** @test */ - public function createDataAttributeTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createDataAttributeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $parentId = 'parentId2070327504'; - $attributeCount = 688916052; - $etag = 'etag3123477'; - $expectedResponse = new DataAttribute(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setParentId($parentId); - $expectedResponse->setAttributeCount($attributeCount); - $expectedResponse->setEtag($etag); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createDataAttributeTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->dataTaxonomyName('[PROJECT]', '[LOCATION]', '[DATA_TAXONOMY_ID]'); - $dataAttributeId = 'dataAttributeId-1927466989'; - $dataAttribute = new DataAttribute(); - $request = (new CreateDataAttributeRequest()) - ->setParent($formattedParent) - ->setDataAttributeId($dataAttributeId) - ->setDataAttribute($dataAttribute); - $response = $gapicClient->createDataAttribute($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataTaxonomyService/CreateDataAttribute', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getDataAttributeId(); - $this->assertProtobufEquals($dataAttributeId, $actualValue); - $actualValue = $actualApiRequestObject->getDataAttribute(); - $this->assertProtobufEquals($dataAttribute, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createDataAttributeTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createDataAttributeExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createDataAttributeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->dataTaxonomyName('[PROJECT]', '[LOCATION]', '[DATA_TAXONOMY_ID]'); - $dataAttributeId = 'dataAttributeId-1927466989'; - $dataAttribute = new DataAttribute(); - $request = (new CreateDataAttributeRequest()) - ->setParent($formattedParent) - ->setDataAttributeId($dataAttributeId) - ->setDataAttribute($dataAttribute); - $response = $gapicClient->createDataAttribute($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createDataAttributeTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createDataAttributeBindingTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createDataAttributeBindingTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $etag = 'etag3123477'; - $resource = 'resource-341064690'; - $expectedResponse = new DataAttributeBinding(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setEtag($etag); - $expectedResponse->setResource($resource); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createDataAttributeBindingTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $dataAttributeBindingId = 'dataAttributeBindingId863052813'; - $dataAttributeBinding = new DataAttributeBinding(); - $request = (new CreateDataAttributeBindingRequest()) - ->setParent($formattedParent) - ->setDataAttributeBindingId($dataAttributeBindingId) - ->setDataAttributeBinding($dataAttributeBinding); - $response = $gapicClient->createDataAttributeBinding($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataTaxonomyService/CreateDataAttributeBinding', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getDataAttributeBindingId(); - $this->assertProtobufEquals($dataAttributeBindingId, $actualValue); - $actualValue = $actualApiRequestObject->getDataAttributeBinding(); - $this->assertProtobufEquals($dataAttributeBinding, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createDataAttributeBindingTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createDataAttributeBindingExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createDataAttributeBindingTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $dataAttributeBindingId = 'dataAttributeBindingId863052813'; - $dataAttributeBinding = new DataAttributeBinding(); - $request = (new CreateDataAttributeBindingRequest()) - ->setParent($formattedParent) - ->setDataAttributeBindingId($dataAttributeBindingId) - ->setDataAttributeBinding($dataAttributeBinding); - $response = $gapicClient->createDataAttributeBinding($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createDataAttributeBindingTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createDataTaxonomyTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createDataTaxonomyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $attributeCount = 688916052; - $etag = 'etag3123477'; - $classCount = 424516728; - $expectedResponse = new DataTaxonomy(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setAttributeCount($attributeCount); - $expectedResponse->setEtag($etag); - $expectedResponse->setClassCount($classCount); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createDataTaxonomyTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $dataTaxonomyId = 'dataTaxonomyId-857059404'; - $dataTaxonomy = new DataTaxonomy(); - $request = (new CreateDataTaxonomyRequest()) - ->setParent($formattedParent) - ->setDataTaxonomyId($dataTaxonomyId) - ->setDataTaxonomy($dataTaxonomy); - $response = $gapicClient->createDataTaxonomy($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataTaxonomyService/CreateDataTaxonomy', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getDataTaxonomyId(); - $this->assertProtobufEquals($dataTaxonomyId, $actualValue); - $actualValue = $actualApiRequestObject->getDataTaxonomy(); - $this->assertProtobufEquals($dataTaxonomy, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createDataTaxonomyTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createDataTaxonomyExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createDataTaxonomyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $dataTaxonomyId = 'dataTaxonomyId-857059404'; - $dataTaxonomy = new DataTaxonomy(); - $request = (new CreateDataTaxonomyRequest()) - ->setParent($formattedParent) - ->setDataTaxonomyId($dataTaxonomyId) - ->setDataTaxonomy($dataTaxonomy); - $response = $gapicClient->createDataTaxonomy($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createDataTaxonomyTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteDataAttributeTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteDataAttributeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteDataAttributeTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->dataAttributeName('[PROJECT]', '[LOCATION]', '[DATATAXONOMY]', '[DATA_ATTRIBUTE_ID]'); - $request = (new DeleteDataAttributeRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteDataAttribute($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataTaxonomyService/DeleteDataAttribute', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteDataAttributeTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteDataAttributeExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteDataAttributeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->dataAttributeName('[PROJECT]', '[LOCATION]', '[DATATAXONOMY]', '[DATA_ATTRIBUTE_ID]'); - $request = (new DeleteDataAttributeRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteDataAttribute($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteDataAttributeTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteDataAttributeBindingTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteDataAttributeBindingTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteDataAttributeBindingTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->dataAttributeBindingName('[PROJECT]', '[LOCATION]', '[DATA_ATTRIBUTE_BINDING_ID]'); - $etag = 'etag3123477'; - $request = (new DeleteDataAttributeBindingRequest()) - ->setName($formattedName) - ->setEtag($etag); - $response = $gapicClient->deleteDataAttributeBinding($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataTaxonomyService/DeleteDataAttributeBinding', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualApiRequestObject->getEtag(); - $this->assertProtobufEquals($etag, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteDataAttributeBindingTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteDataAttributeBindingExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteDataAttributeBindingTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->dataAttributeBindingName('[PROJECT]', '[LOCATION]', '[DATA_ATTRIBUTE_BINDING_ID]'); - $etag = 'etag3123477'; - $request = (new DeleteDataAttributeBindingRequest()) - ->setName($formattedName) - ->setEtag($etag); - $response = $gapicClient->deleteDataAttributeBinding($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteDataAttributeBindingTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteDataTaxonomyTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteDataTaxonomyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteDataTaxonomyTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->dataTaxonomyName('[PROJECT]', '[LOCATION]', '[DATA_TAXONOMY_ID]'); - $request = (new DeleteDataTaxonomyRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteDataTaxonomy($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataTaxonomyService/DeleteDataTaxonomy', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteDataTaxonomyTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteDataTaxonomyExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteDataTaxonomyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->dataTaxonomyName('[PROJECT]', '[LOCATION]', '[DATA_TAXONOMY_ID]'); - $request = (new DeleteDataTaxonomyRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteDataTaxonomy($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteDataTaxonomyTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getDataAttributeTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $parentId = 'parentId2070327504'; - $attributeCount = 688916052; - $etag = 'etag3123477'; - $expectedResponse = new DataAttribute(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setParentId($parentId); - $expectedResponse->setAttributeCount($attributeCount); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->dataAttributeName('[PROJECT]', '[LOCATION]', '[DATATAXONOMY]', '[DATA_ATTRIBUTE_ID]'); - $request = (new GetDataAttributeRequest()) - ->setName($formattedName); - $response = $gapicClient->getDataAttribute($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataTaxonomyService/GetDataAttribute', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDataAttributeExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->dataAttributeName('[PROJECT]', '[LOCATION]', '[DATATAXONOMY]', '[DATA_ATTRIBUTE_ID]'); - $request = (new GetDataAttributeRequest()) - ->setName($formattedName); - try { - $gapicClient->getDataAttribute($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDataAttributeBindingTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $etag = 'etag3123477'; - $resource = 'resource-341064690'; - $expectedResponse = new DataAttributeBinding(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setEtag($etag); - $expectedResponse->setResource($resource); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->dataAttributeBindingName('[PROJECT]', '[LOCATION]', '[DATA_ATTRIBUTE_BINDING_ID]'); - $request = (new GetDataAttributeBindingRequest()) - ->setName($formattedName); - $response = $gapicClient->getDataAttributeBinding($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataTaxonomyService/GetDataAttributeBinding', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDataAttributeBindingExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->dataAttributeBindingName('[PROJECT]', '[LOCATION]', '[DATA_ATTRIBUTE_BINDING_ID]'); - $request = (new GetDataAttributeBindingRequest()) - ->setName($formattedName); - try { - $gapicClient->getDataAttributeBinding($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDataTaxonomyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $attributeCount = 688916052; - $etag = 'etag3123477'; - $classCount = 424516728; - $expectedResponse = new DataTaxonomy(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setAttributeCount($attributeCount); - $expectedResponse->setEtag($etag); - $expectedResponse->setClassCount($classCount); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->dataTaxonomyName('[PROJECT]', '[LOCATION]', '[DATA_TAXONOMY_ID]'); - $request = (new GetDataTaxonomyRequest()) - ->setName($formattedName); - $response = $gapicClient->getDataTaxonomy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataTaxonomyService/GetDataTaxonomy', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDataTaxonomyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->dataTaxonomyName('[PROJECT]', '[LOCATION]', '[DATA_TAXONOMY_ID]'); - $request = (new GetDataTaxonomyRequest()) - ->setName($formattedName); - try { - $gapicClient->getDataTaxonomy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDataAttributeBindingsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $dataAttributeBindingsElement = new DataAttributeBinding(); - $dataAttributeBindings = [ - $dataAttributeBindingsElement, - ]; - $expectedResponse = new ListDataAttributeBindingsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setDataAttributeBindings($dataAttributeBindings); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListDataAttributeBindingsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listDataAttributeBindings($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getDataAttributeBindings()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataTaxonomyService/ListDataAttributeBindings', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDataAttributeBindingsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListDataAttributeBindingsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listDataAttributeBindings($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDataAttributesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $dataAttributesElement = new DataAttribute(); - $dataAttributes = [ - $dataAttributesElement, - ]; - $expectedResponse = new ListDataAttributesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setDataAttributes($dataAttributes); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->dataTaxonomyName('[PROJECT]', '[LOCATION]', '[DATA_TAXONOMY_ID]'); - $request = (new ListDataAttributesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listDataAttributes($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getDataAttributes()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataTaxonomyService/ListDataAttributes', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDataAttributesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->dataTaxonomyName('[PROJECT]', '[LOCATION]', '[DATA_TAXONOMY_ID]'); - $request = (new ListDataAttributesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listDataAttributes($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDataTaxonomiesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $dataTaxonomiesElement = new DataTaxonomy(); - $dataTaxonomies = [ - $dataTaxonomiesElement, - ]; - $expectedResponse = new ListDataTaxonomiesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setDataTaxonomies($dataTaxonomies); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListDataTaxonomiesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listDataTaxonomies($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getDataTaxonomies()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataTaxonomyService/ListDataTaxonomies', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDataTaxonomiesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListDataTaxonomiesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listDataTaxonomies($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateDataAttributeTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateDataAttributeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $parentId = 'parentId2070327504'; - $attributeCount = 688916052; - $etag = 'etag3123477'; - $expectedResponse = new DataAttribute(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setParentId($parentId); - $expectedResponse->setAttributeCount($attributeCount); - $expectedResponse->setEtag($etag); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateDataAttributeTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $updateMask = new FieldMask(); - $dataAttribute = new DataAttribute(); - $request = (new UpdateDataAttributeRequest()) - ->setUpdateMask($updateMask) - ->setDataAttribute($dataAttribute); - $response = $gapicClient->updateDataAttribute($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataTaxonomyService/UpdateDataAttribute', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualApiRequestObject->getDataAttribute(); - $this->assertProtobufEquals($dataAttribute, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateDataAttributeTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateDataAttributeExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateDataAttributeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $updateMask = new FieldMask(); - $dataAttribute = new DataAttribute(); - $request = (new UpdateDataAttributeRequest()) - ->setUpdateMask($updateMask) - ->setDataAttribute($dataAttribute); - $response = $gapicClient->updateDataAttribute($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateDataAttributeTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateDataAttributeBindingTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateDataAttributeBindingTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $etag = 'etag3123477'; - $resource = 'resource-341064690'; - $expectedResponse = new DataAttributeBinding(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setEtag($etag); - $expectedResponse->setResource($resource); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateDataAttributeBindingTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $updateMask = new FieldMask(); - $dataAttributeBinding = new DataAttributeBinding(); - $request = (new UpdateDataAttributeBindingRequest()) - ->setUpdateMask($updateMask) - ->setDataAttributeBinding($dataAttributeBinding); - $response = $gapicClient->updateDataAttributeBinding($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataTaxonomyService/UpdateDataAttributeBinding', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualApiRequestObject->getDataAttributeBinding(); - $this->assertProtobufEquals($dataAttributeBinding, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateDataAttributeBindingTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateDataAttributeBindingExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateDataAttributeBindingTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $updateMask = new FieldMask(); - $dataAttributeBinding = new DataAttributeBinding(); - $request = (new UpdateDataAttributeBindingRequest()) - ->setUpdateMask($updateMask) - ->setDataAttributeBinding($dataAttributeBinding); - $response = $gapicClient->updateDataAttributeBinding($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateDataAttributeBindingTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateDataTaxonomyTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateDataTaxonomyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $attributeCount = 688916052; - $etag = 'etag3123477'; - $classCount = 424516728; - $expectedResponse = new DataTaxonomy(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setAttributeCount($attributeCount); - $expectedResponse->setEtag($etag); - $expectedResponse->setClassCount($classCount); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateDataTaxonomyTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $updateMask = new FieldMask(); - $dataTaxonomy = new DataTaxonomy(); - $request = (new UpdateDataTaxonomyRequest()) - ->setUpdateMask($updateMask) - ->setDataTaxonomy($dataTaxonomy); - $response = $gapicClient->updateDataTaxonomy($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataTaxonomyService/UpdateDataTaxonomy', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualApiRequestObject->getDataTaxonomy(); - $this->assertProtobufEquals($dataTaxonomy, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateDataTaxonomyTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateDataTaxonomyExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateDataTaxonomyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $updateMask = new FieldMask(); - $dataTaxonomy = new DataTaxonomy(); - $request = (new UpdateDataTaxonomyRequest()) - ->setUpdateMask($updateMask) - ->setDataTaxonomy($dataTaxonomy); - $response = $gapicClient->updateDataTaxonomy($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateDataTaxonomyTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - $response = $gapicClient->getIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - try { - $gapicClient->getIamPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - $response = $gapicClient->setIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPolicy(); - $this->assertProtobufEquals($policy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - try { - $gapicClient->setIamPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new TestIamPermissionsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - $response = $gapicClient->testIamPermissions($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPermissions(); - $this->assertProtobufEquals($permissions, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - try { - $gapicClient->testIamPermissions($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $locationId = 'locationId552319461'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Location(); - $expectedResponse->setName($name2); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - $request = new GetLocationRequest(); - $response = $gapicClient->getLocation($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new GetLocationRequest(); - try { - $gapicClient->getLocation($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; - $expectedResponse = new ListLocationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLocations($locations); - $transport->addResponse($expectedResponse); - $request = new ListLocationsRequest(); - $response = $gapicClient->listLocations($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new ListLocationsRequest(); - try { - $gapicClient->listLocations($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createDataAttributeAsyncTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createDataAttributeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $parentId = 'parentId2070327504'; - $attributeCount = 688916052; - $etag = 'etag3123477'; - $expectedResponse = new DataAttribute(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setParentId($parentId); - $expectedResponse->setAttributeCount($attributeCount); - $expectedResponse->setEtag($etag); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createDataAttributeTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->dataTaxonomyName('[PROJECT]', '[LOCATION]', '[DATA_TAXONOMY_ID]'); - $dataAttributeId = 'dataAttributeId-1927466989'; - $dataAttribute = new DataAttribute(); - $request = (new CreateDataAttributeRequest()) - ->setParent($formattedParent) - ->setDataAttributeId($dataAttributeId) - ->setDataAttribute($dataAttribute); - $response = $gapicClient->createDataAttributeAsync($request)->wait(); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataTaxonomyService/CreateDataAttribute', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getDataAttributeId(); - $this->assertProtobufEquals($dataAttributeId, $actualValue); - $actualValue = $actualApiRequestObject->getDataAttribute(); - $this->assertProtobufEquals($dataAttribute, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createDataAttributeTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } -} diff --git a/owl-bot-staging/Dataplex/v1/tests/Unit/V1/Client/DataplexServiceClientTest.php b/owl-bot-staging/Dataplex/v1/tests/Unit/V1/Client/DataplexServiceClientTest.php deleted file mode 100644 index 7ce5752b8e8d..000000000000 --- a/owl-bot-staging/Dataplex/v1/tests/Unit/V1/Client/DataplexServiceClientTest.php +++ /dev/null @@ -1,3840 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return DataplexServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new DataplexServiceClient($options); - } - - /** @test */ - public function cancelJobTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->jobName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]', '[JOB]'); - $request = (new CancelJobRequest()) - ->setName($formattedName); - $gapicClient->cancelJob($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/CancelJob', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function cancelJobExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->jobName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]', '[JOB]'); - $request = (new CancelJobRequest()) - ->setName($formattedName); - try { - $gapicClient->cancelJob($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createAssetTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createAssetTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $expectedResponse = new Asset(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createAssetTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); - $assetId = 'assetId-373202742'; - $asset = new Asset(); - $assetResourceSpec = new ResourceSpec(); - $resourceSpecType = Type::TYPE_UNSPECIFIED; - $assetResourceSpec->setType($resourceSpecType); - $asset->setResourceSpec($assetResourceSpec); - $request = (new CreateAssetRequest()) - ->setParent($formattedParent) - ->setAssetId($assetId) - ->setAsset($asset); - $response = $gapicClient->createAsset($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/CreateAsset', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getAssetId(); - $this->assertProtobufEquals($assetId, $actualValue); - $actualValue = $actualApiRequestObject->getAsset(); - $this->assertProtobufEquals($asset, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAssetTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createAssetExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createAssetTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); - $assetId = 'assetId-373202742'; - $asset = new Asset(); - $assetResourceSpec = new ResourceSpec(); - $resourceSpecType = Type::TYPE_UNSPECIFIED; - $assetResourceSpec->setType($resourceSpecType); - $asset->setResourceSpec($assetResourceSpec); - $request = (new CreateAssetRequest()) - ->setParent($formattedParent) - ->setAssetId($assetId) - ->setAsset($asset); - $response = $gapicClient->createAsset($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAssetTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createEnvironmentTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createEnvironmentTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $expectedResponse = new Environment(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createEnvironmentTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - $environmentId = 'environmentId608412359'; - $environment = new Environment(); - $environmentInfrastructureSpec = new InfrastructureSpec(); - $infrastructureSpecOsImage = new OsImageRuntime(); - $osImageImageVersion = 'osImageImageVersion-831593868'; - $infrastructureSpecOsImage->setImageVersion($osImageImageVersion); - $environmentInfrastructureSpec->setOsImage($infrastructureSpecOsImage); - $environment->setInfrastructureSpec($environmentInfrastructureSpec); - $request = (new CreateEnvironmentRequest()) - ->setParent($formattedParent) - ->setEnvironmentId($environmentId) - ->setEnvironment($environment); - $response = $gapicClient->createEnvironment($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/CreateEnvironment', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getEnvironmentId(); - $this->assertProtobufEquals($environmentId, $actualValue); - $actualValue = $actualApiRequestObject->getEnvironment(); - $this->assertProtobufEquals($environment, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createEnvironmentTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createEnvironmentExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createEnvironmentTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - $environmentId = 'environmentId608412359'; - $environment = new Environment(); - $environmentInfrastructureSpec = new InfrastructureSpec(); - $infrastructureSpecOsImage = new OsImageRuntime(); - $osImageImageVersion = 'osImageImageVersion-831593868'; - $infrastructureSpecOsImage->setImageVersion($osImageImageVersion); - $environmentInfrastructureSpec->setOsImage($infrastructureSpecOsImage); - $environment->setInfrastructureSpec($environmentInfrastructureSpec); - $request = (new CreateEnvironmentRequest()) - ->setParent($formattedParent) - ->setEnvironmentId($environmentId) - ->setEnvironment($environment); - $response = $gapicClient->createEnvironment($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createEnvironmentTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createLakeTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createLakeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $serviceAccount = 'serviceAccount-1948028253'; - $expectedResponse = new Lake(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setServiceAccount($serviceAccount); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createLakeTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $lakeId = 'lakeId-54902325'; - $lake = new Lake(); - $request = (new CreateLakeRequest()) - ->setParent($formattedParent) - ->setLakeId($lakeId) - ->setLake($lake); - $response = $gapicClient->createLake($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/CreateLake', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getLakeId(); - $this->assertProtobufEquals($lakeId, $actualValue); - $actualValue = $actualApiRequestObject->getLake(); - $this->assertProtobufEquals($lake, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createLakeTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createLakeExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createLakeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $lakeId = 'lakeId-54902325'; - $lake = new Lake(); - $request = (new CreateLakeRequest()) - ->setParent($formattedParent) - ->setLakeId($lakeId) - ->setLake($lake); - $response = $gapicClient->createLake($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createLakeTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createTaskTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createTaskTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Task(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createTaskTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - $taskId = 'taskId-1537240555'; - $task = new Task(); - $taskTriggerSpec = new TriggerSpec(); - $triggerSpecType = \Google\Cloud\Dataplex\V1\Task\TriggerSpec\Type::TYPE_UNSPECIFIED; - $taskTriggerSpec->setType($triggerSpecType); - $task->setTriggerSpec($taskTriggerSpec); - $taskExecutionSpec = new ExecutionSpec(); - $executionSpecServiceAccount = 'executionSpecServiceAccount-1249728629'; - $taskExecutionSpec->setServiceAccount($executionSpecServiceAccount); - $task->setExecutionSpec($taskExecutionSpec); - $request = (new CreateTaskRequest()) - ->setParent($formattedParent) - ->setTaskId($taskId) - ->setTask($task); - $response = $gapicClient->createTask($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/CreateTask', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getTaskId(); - $this->assertProtobufEquals($taskId, $actualValue); - $actualValue = $actualApiRequestObject->getTask(); - $this->assertProtobufEquals($task, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createTaskTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createTaskExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createTaskTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - $taskId = 'taskId-1537240555'; - $task = new Task(); - $taskTriggerSpec = new TriggerSpec(); - $triggerSpecType = \Google\Cloud\Dataplex\V1\Task\TriggerSpec\Type::TYPE_UNSPECIFIED; - $taskTriggerSpec->setType($triggerSpecType); - $task->setTriggerSpec($taskTriggerSpec); - $taskExecutionSpec = new ExecutionSpec(); - $executionSpecServiceAccount = 'executionSpecServiceAccount-1249728629'; - $taskExecutionSpec->setServiceAccount($executionSpecServiceAccount); - $task->setExecutionSpec($taskExecutionSpec); - $request = (new CreateTaskRequest()) - ->setParent($formattedParent) - ->setTaskId($taskId) - ->setTask($task); - $response = $gapicClient->createTask($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createTaskTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createZoneTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createZoneTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $expectedResponse = new Zone(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createZoneTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - $zoneId = 'zoneId-111174002'; - $zone = new Zone(); - $zoneType = \Google\Cloud\Dataplex\V1\Zone\Type::TYPE_UNSPECIFIED; - $zone->setType($zoneType); - $zoneResourceSpec = new \Google\Cloud\Dataplex\V1\Zone\ResourceSpec(); - $resourceSpecLocationType = LocationType::LOCATION_TYPE_UNSPECIFIED; - $zoneResourceSpec->setLocationType($resourceSpecLocationType); - $zone->setResourceSpec($zoneResourceSpec); - $request = (new CreateZoneRequest()) - ->setParent($formattedParent) - ->setZoneId($zoneId) - ->setZone($zone); - $response = $gapicClient->createZone($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/CreateZone', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getZoneId(); - $this->assertProtobufEquals($zoneId, $actualValue); - $actualValue = $actualApiRequestObject->getZone(); - $this->assertProtobufEquals($zone, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createZoneTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createZoneExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createZoneTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - $zoneId = 'zoneId-111174002'; - $zone = new Zone(); - $zoneType = \Google\Cloud\Dataplex\V1\Zone\Type::TYPE_UNSPECIFIED; - $zone->setType($zoneType); - $zoneResourceSpec = new \Google\Cloud\Dataplex\V1\Zone\ResourceSpec(); - $resourceSpecLocationType = LocationType::LOCATION_TYPE_UNSPECIFIED; - $zoneResourceSpec->setLocationType($resourceSpecLocationType); - $zone->setResourceSpec($zoneResourceSpec); - $request = (new CreateZoneRequest()) - ->setParent($formattedParent) - ->setZoneId($zoneId) - ->setZone($zone); - $response = $gapicClient->createZone($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createZoneTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteAssetTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteAssetTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteAssetTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->assetName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ASSET]'); - $request = (new DeleteAssetRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteAsset($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/DeleteAsset', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteAssetTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteAssetExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteAssetTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->assetName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ASSET]'); - $request = (new DeleteAssetRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteAsset($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteAssetTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteEnvironmentTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteEnvironmentTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteEnvironmentTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->environmentName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ENVIRONMENT]'); - $request = (new DeleteEnvironmentRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteEnvironment($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/DeleteEnvironment', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteEnvironmentTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteEnvironmentExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteEnvironmentTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->environmentName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ENVIRONMENT]'); - $request = (new DeleteEnvironmentRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteEnvironment($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteEnvironmentTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteLakeTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteLakeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteLakeTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - $request = (new DeleteLakeRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteLake($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/DeleteLake', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteLakeTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteLakeExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteLakeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - $request = (new DeleteLakeRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteLake($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteLakeTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteTaskTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteTaskTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteTaskTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->taskName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]'); - $request = (new DeleteTaskRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteTask($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/DeleteTask', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteTaskTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteTaskExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteTaskTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->taskName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]'); - $request = (new DeleteTaskRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteTask($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteTaskTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteZoneTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteZoneTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteZoneTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); - $request = (new DeleteZoneRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteZone($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/DeleteZone', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteZoneTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteZoneExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteZoneTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); - $request = (new DeleteZoneRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteZone($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteZoneTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getAssetTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $expectedResponse = new Asset(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->assetName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ASSET]'); - $request = (new GetAssetRequest()) - ->setName($formattedName); - $response = $gapicClient->getAsset($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/GetAsset', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAssetExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->assetName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ASSET]'); - $request = (new GetAssetRequest()) - ->setName($formattedName); - try { - $gapicClient->getAsset($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getEnvironmentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $expectedResponse = new Environment(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->environmentName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ENVIRONMENT]'); - $request = (new GetEnvironmentRequest()) - ->setName($formattedName); - $response = $gapicClient->getEnvironment($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/GetEnvironment', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getEnvironmentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->environmentName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ENVIRONMENT]'); - $request = (new GetEnvironmentRequest()) - ->setName($formattedName); - try { - $gapicClient->getEnvironment($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getJobTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $retryCount = 928040776; - $serviceJob = 'serviceJob-1928057037'; - $message = 'message954925063'; - $expectedResponse = new Job(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setRetryCount($retryCount); - $expectedResponse->setServiceJob($serviceJob); - $expectedResponse->setMessage($message); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->jobName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]', '[JOB]'); - $request = (new GetJobRequest()) - ->setName($formattedName); - $response = $gapicClient->getJob($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/GetJob', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getJobExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->jobName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]', '[JOB]'); - $request = (new GetJobRequest()) - ->setName($formattedName); - try { - $gapicClient->getJob($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLakeTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $serviceAccount = 'serviceAccount-1948028253'; - $expectedResponse = new Lake(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setServiceAccount($serviceAccount); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - $request = (new GetLakeRequest()) - ->setName($formattedName); - $response = $gapicClient->getLake($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/GetLake', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLakeExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - $request = (new GetLakeRequest()) - ->setName($formattedName); - try { - $gapicClient->getLake($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getTaskTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Task(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->taskName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]'); - $request = (new GetTaskRequest()) - ->setName($formattedName); - $response = $gapicClient->getTask($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/GetTask', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getTaskExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->taskName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]'); - $request = (new GetTaskRequest()) - ->setName($formattedName); - try { - $gapicClient->getTask($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getZoneTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $expectedResponse = new Zone(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); - $request = (new GetZoneRequest()) - ->setName($formattedName); - $response = $gapicClient->getZone($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/GetZone', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getZoneExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); - $request = (new GetZoneRequest()) - ->setName($formattedName); - try { - $gapicClient->getZone($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAssetActionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $actionsElement = new Action(); - $actions = [ - $actionsElement, - ]; - $expectedResponse = new ListActionsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setActions($actions); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->assetName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ASSET]'); - $request = (new ListAssetActionsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listAssetActions($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getActions()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/ListAssetActions', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAssetActionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->assetName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ASSET]'); - $request = (new ListAssetActionsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listAssetActions($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAssetsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $assetsElement = new Asset(); - $assets = [ - $assetsElement, - ]; - $expectedResponse = new ListAssetsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setAssets($assets); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); - $request = (new ListAssetsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listAssets($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getAssets()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/ListAssets', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAssetsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); - $request = (new ListAssetsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listAssets($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listEnvironmentsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $environmentsElement = new Environment(); - $environments = [ - $environmentsElement, - ]; - $expectedResponse = new ListEnvironmentsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setEnvironments($environments); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - $request = (new ListEnvironmentsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listEnvironments($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getEnvironments()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/ListEnvironments', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listEnvironmentsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - $request = (new ListEnvironmentsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listEnvironments($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listJobsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $jobsElement = new Job(); - $jobs = [ - $jobsElement, - ]; - $expectedResponse = new ListJobsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setJobs($jobs); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->taskName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]'); - $request = (new ListJobsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listJobs($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getJobs()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/ListJobs', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listJobsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->taskName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]'); - $request = (new ListJobsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listJobs($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLakeActionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $actionsElement = new Action(); - $actions = [ - $actionsElement, - ]; - $expectedResponse = new ListActionsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setActions($actions); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - $request = (new ListLakeActionsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listLakeActions($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getActions()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/ListLakeActions', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLakeActionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - $request = (new ListLakeActionsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listLakeActions($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLakesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $lakesElement = new Lake(); - $lakes = [ - $lakesElement, - ]; - $expectedResponse = new ListLakesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLakes($lakes); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListLakesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listLakes($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLakes()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/ListLakes', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLakesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListLakesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listLakes($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listSessionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $sessionsElement = new Session(); - $sessions = [ - $sessionsElement, - ]; - $expectedResponse = new ListSessionsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setSessions($sessions); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->environmentName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ENVIRONMENT]'); - $request = (new ListSessionsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listSessions($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getSessions()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/ListSessions', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listSessionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->environmentName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ENVIRONMENT]'); - $request = (new ListSessionsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listSessions($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listTasksTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $tasksElement = new Task(); - $tasks = [ - $tasksElement, - ]; - $expectedResponse = new ListTasksResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setTasks($tasks); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - $request = (new ListTasksRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listTasks($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getTasks()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/ListTasks', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listTasksExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - $request = (new ListTasksRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listTasks($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listZoneActionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $actionsElement = new Action(); - $actions = [ - $actionsElement, - ]; - $expectedResponse = new ListActionsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setActions($actions); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); - $request = (new ListZoneActionsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listZoneActions($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getActions()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/ListZoneActions', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listZoneActionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); - $request = (new ListZoneActionsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listZoneActions($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listZonesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $zonesElement = new Zone(); - $zones = [ - $zonesElement, - ]; - $expectedResponse = new ListZonesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setZones($zones); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - $request = (new ListZonesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listZones($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getZones()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/ListZones', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listZonesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - $request = (new ListZonesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listZones($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function runTaskTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new RunTaskResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->taskName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]'); - $request = (new RunTaskRequest()) - ->setName($formattedName); - $response = $gapicClient->runTask($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/RunTask', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function runTaskExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->taskName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]'); - $request = (new RunTaskRequest()) - ->setName($formattedName); - try { - $gapicClient->runTask($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateAssetTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateAssetTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $expectedResponse = new Asset(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateAssetTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $updateMask = new FieldMask(); - $asset = new Asset(); - $assetResourceSpec = new ResourceSpec(); - $resourceSpecType = Type::TYPE_UNSPECIFIED; - $assetResourceSpec->setType($resourceSpecType); - $asset->setResourceSpec($assetResourceSpec); - $request = (new UpdateAssetRequest()) - ->setUpdateMask($updateMask) - ->setAsset($asset); - $response = $gapicClient->updateAsset($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/UpdateAsset', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualApiRequestObject->getAsset(); - $this->assertProtobufEquals($asset, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateAssetTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateAssetExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateAssetTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $updateMask = new FieldMask(); - $asset = new Asset(); - $assetResourceSpec = new ResourceSpec(); - $resourceSpecType = Type::TYPE_UNSPECIFIED; - $assetResourceSpec->setType($resourceSpecType); - $asset->setResourceSpec($assetResourceSpec); - $request = (new UpdateAssetRequest()) - ->setUpdateMask($updateMask) - ->setAsset($asset); - $response = $gapicClient->updateAsset($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateAssetTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateEnvironmentTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateEnvironmentTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $expectedResponse = new Environment(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateEnvironmentTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $updateMask = new FieldMask(); - $environment = new Environment(); - $environmentInfrastructureSpec = new InfrastructureSpec(); - $infrastructureSpecOsImage = new OsImageRuntime(); - $osImageImageVersion = 'osImageImageVersion-831593868'; - $infrastructureSpecOsImage->setImageVersion($osImageImageVersion); - $environmentInfrastructureSpec->setOsImage($infrastructureSpecOsImage); - $environment->setInfrastructureSpec($environmentInfrastructureSpec); - $request = (new UpdateEnvironmentRequest()) - ->setUpdateMask($updateMask) - ->setEnvironment($environment); - $response = $gapicClient->updateEnvironment($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/UpdateEnvironment', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualApiRequestObject->getEnvironment(); - $this->assertProtobufEquals($environment, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateEnvironmentTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateEnvironmentExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateEnvironmentTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $updateMask = new FieldMask(); - $environment = new Environment(); - $environmentInfrastructureSpec = new InfrastructureSpec(); - $infrastructureSpecOsImage = new OsImageRuntime(); - $osImageImageVersion = 'osImageImageVersion-831593868'; - $infrastructureSpecOsImage->setImageVersion($osImageImageVersion); - $environmentInfrastructureSpec->setOsImage($infrastructureSpecOsImage); - $environment->setInfrastructureSpec($environmentInfrastructureSpec); - $request = (new UpdateEnvironmentRequest()) - ->setUpdateMask($updateMask) - ->setEnvironment($environment); - $response = $gapicClient->updateEnvironment($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateEnvironmentTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateLakeTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateLakeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $serviceAccount = 'serviceAccount-1948028253'; - $expectedResponse = new Lake(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setServiceAccount($serviceAccount); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateLakeTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $updateMask = new FieldMask(); - $lake = new Lake(); - $request = (new UpdateLakeRequest()) - ->setUpdateMask($updateMask) - ->setLake($lake); - $response = $gapicClient->updateLake($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/UpdateLake', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualApiRequestObject->getLake(); - $this->assertProtobufEquals($lake, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateLakeTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateLakeExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateLakeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $updateMask = new FieldMask(); - $lake = new Lake(); - $request = (new UpdateLakeRequest()) - ->setUpdateMask($updateMask) - ->setLake($lake); - $response = $gapicClient->updateLake($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateLakeTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateTaskTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateTaskTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Task(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateTaskTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $updateMask = new FieldMask(); - $task = new Task(); - $taskTriggerSpec = new TriggerSpec(); - $triggerSpecType = \Google\Cloud\Dataplex\V1\Task\TriggerSpec\Type::TYPE_UNSPECIFIED; - $taskTriggerSpec->setType($triggerSpecType); - $task->setTriggerSpec($taskTriggerSpec); - $taskExecutionSpec = new ExecutionSpec(); - $executionSpecServiceAccount = 'executionSpecServiceAccount-1249728629'; - $taskExecutionSpec->setServiceAccount($executionSpecServiceAccount); - $task->setExecutionSpec($taskExecutionSpec); - $request = (new UpdateTaskRequest()) - ->setUpdateMask($updateMask) - ->setTask($task); - $response = $gapicClient->updateTask($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/UpdateTask', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualApiRequestObject->getTask(); - $this->assertProtobufEquals($task, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateTaskTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateTaskExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateTaskTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $updateMask = new FieldMask(); - $task = new Task(); - $taskTriggerSpec = new TriggerSpec(); - $triggerSpecType = \Google\Cloud\Dataplex\V1\Task\TriggerSpec\Type::TYPE_UNSPECIFIED; - $taskTriggerSpec->setType($triggerSpecType); - $task->setTriggerSpec($taskTriggerSpec); - $taskExecutionSpec = new ExecutionSpec(); - $executionSpecServiceAccount = 'executionSpecServiceAccount-1249728629'; - $taskExecutionSpec->setServiceAccount($executionSpecServiceAccount); - $task->setExecutionSpec($taskExecutionSpec); - $request = (new UpdateTaskRequest()) - ->setUpdateMask($updateMask) - ->setTask($task); - $response = $gapicClient->updateTask($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateTaskTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateZoneTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateZoneTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $expectedResponse = new Zone(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateZoneTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $updateMask = new FieldMask(); - $zone = new Zone(); - $zoneType = \Google\Cloud\Dataplex\V1\Zone\Type::TYPE_UNSPECIFIED; - $zone->setType($zoneType); - $zoneResourceSpec = new \Google\Cloud\Dataplex\V1\Zone\ResourceSpec(); - $resourceSpecLocationType = LocationType::LOCATION_TYPE_UNSPECIFIED; - $zoneResourceSpec->setLocationType($resourceSpecLocationType); - $zone->setResourceSpec($zoneResourceSpec); - $request = (new UpdateZoneRequest()) - ->setUpdateMask($updateMask) - ->setZone($zone); - $response = $gapicClient->updateZone($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/UpdateZone', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualApiRequestObject->getZone(); - $this->assertProtobufEquals($zone, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateZoneTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateZoneExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateZoneTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $updateMask = new FieldMask(); - $zone = new Zone(); - $zoneType = \Google\Cloud\Dataplex\V1\Zone\Type::TYPE_UNSPECIFIED; - $zone->setType($zoneType); - $zoneResourceSpec = new \Google\Cloud\Dataplex\V1\Zone\ResourceSpec(); - $resourceSpecLocationType = LocationType::LOCATION_TYPE_UNSPECIFIED; - $zoneResourceSpec->setLocationType($resourceSpecLocationType); - $zone->setResourceSpec($zoneResourceSpec); - $request = (new UpdateZoneRequest()) - ->setUpdateMask($updateMask) - ->setZone($zone); - $response = $gapicClient->updateZone($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateZoneTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - $response = $gapicClient->getIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - try { - $gapicClient->getIamPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - $response = $gapicClient->setIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPolicy(); - $this->assertProtobufEquals($policy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - try { - $gapicClient->setIamPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new TestIamPermissionsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - $response = $gapicClient->testIamPermissions($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPermissions(); - $this->assertProtobufEquals($permissions, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - try { - $gapicClient->testIamPermissions($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $locationId = 'locationId552319461'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Location(); - $expectedResponse->setName($name2); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - $request = new GetLocationRequest(); - $response = $gapicClient->getLocation($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new GetLocationRequest(); - try { - $gapicClient->getLocation($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; - $expectedResponse = new ListLocationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLocations($locations); - $transport->addResponse($expectedResponse); - $request = new ListLocationsRequest(); - $response = $gapicClient->listLocations($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new ListLocationsRequest(); - try { - $gapicClient->listLocations($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function cancelJobAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->jobName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]', '[JOB]'); - $request = (new CancelJobRequest()) - ->setName($formattedName); - $gapicClient->cancelJobAsync($request)->wait(); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/CancelJob', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Dataplex/v1/tests/Unit/V1/Client/MetadataServiceClientTest.php b/owl-bot-staging/Dataplex/v1/tests/Unit/V1/Client/MetadataServiceClientTest.php deleted file mode 100644 index 5db967b20081..000000000000 --- a/owl-bot-staging/Dataplex/v1/tests/Unit/V1/Client/MetadataServiceClientTest.php +++ /dev/null @@ -1,1239 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return MetadataServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new MetadataServiceClient($options); - } - - /** @test */ - public function createEntityTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $id = 'id3355'; - $etag = 'etag3123477'; - $asset = 'asset93121264'; - $dataPath = 'dataPath-363501670'; - $dataPathPattern = 'dataPathPattern-594427925'; - $catalogEntry = 'catalogEntry-1234004788'; - $uid = 'uid115792'; - $expectedResponse = new Entity(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setId($id); - $expectedResponse->setEtag($etag); - $expectedResponse->setAsset($asset); - $expectedResponse->setDataPath($dataPath); - $expectedResponse->setDataPathPattern($dataPathPattern); - $expectedResponse->setCatalogEntry($catalogEntry); - $expectedResponse->setUid($uid); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); - $entity = new Entity(); - $entityId = 'entityId-2102099874'; - $entity->setId($entityId); - $entityType = Type::TYPE_UNSPECIFIED; - $entity->setType($entityType); - $entityAsset = 'entityAsset1253969101'; - $entity->setAsset($entityAsset); - $entityDataPath = 'entityDataPath1530173426'; - $entity->setDataPath($entityDataPath); - $entitySystem = StorageSystem::STORAGE_SYSTEM_UNSPECIFIED; - $entity->setSystem($entitySystem); - $entityFormat = new StorageFormat(); - $formatMimeType = 'formatMimeType-1419746651'; - $entityFormat->setMimeType($formatMimeType); - $entity->setFormat($entityFormat); - $entitySchema = new Schema(); - $schemaUserManaged = false; - $entitySchema->setUserManaged($schemaUserManaged); - $entity->setSchema($entitySchema); - $request = (new CreateEntityRequest()) - ->setParent($formattedParent) - ->setEntity($entity); - $response = $gapicClient->createEntity($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.MetadataService/CreateEntity', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getEntity(); - $this->assertProtobufEquals($entity, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createEntityExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); - $entity = new Entity(); - $entityId = 'entityId-2102099874'; - $entity->setId($entityId); - $entityType = Type::TYPE_UNSPECIFIED; - $entity->setType($entityType); - $entityAsset = 'entityAsset1253969101'; - $entity->setAsset($entityAsset); - $entityDataPath = 'entityDataPath1530173426'; - $entity->setDataPath($entityDataPath); - $entitySystem = StorageSystem::STORAGE_SYSTEM_UNSPECIFIED; - $entity->setSystem($entitySystem); - $entityFormat = new StorageFormat(); - $formatMimeType = 'formatMimeType-1419746651'; - $entityFormat->setMimeType($formatMimeType); - $entity->setFormat($entityFormat); - $entitySchema = new Schema(); - $schemaUserManaged = false; - $entitySchema->setUserManaged($schemaUserManaged); - $entity->setSchema($entitySchema); - $request = (new CreateEntityRequest()) - ->setParent($formattedParent) - ->setEntity($entity); - try { - $gapicClient->createEntity($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createPartitionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $location = 'location1901043637'; - $etag = 'etag3123477'; - $expectedResponse = new Partition(); - $expectedResponse->setName($name); - $expectedResponse->setLocation($location); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->entityName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ENTITY]'); - $partition = new Partition(); - $partitionValues = []; - $partition->setValues($partitionValues); - $partitionLocation = 'partitionLocation-1757508417'; - $partition->setLocation($partitionLocation); - $request = (new CreatePartitionRequest()) - ->setParent($formattedParent) - ->setPartition($partition); - $response = $gapicClient->createPartition($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.MetadataService/CreatePartition', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getPartition(); - $this->assertProtobufEquals($partition, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createPartitionExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->entityName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ENTITY]'); - $partition = new Partition(); - $partitionValues = []; - $partition->setValues($partitionValues); - $partitionLocation = 'partitionLocation-1757508417'; - $partition->setLocation($partitionLocation); - $request = (new CreatePartitionRequest()) - ->setParent($formattedParent) - ->setPartition($partition); - try { - $gapicClient->createPartition($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteEntityTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->entityName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ENTITY]'); - $etag = 'etag3123477'; - $request = (new DeleteEntityRequest()) - ->setName($formattedName) - ->setEtag($etag); - $gapicClient->deleteEntity($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.MetadataService/DeleteEntity', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getEtag(); - $this->assertProtobufEquals($etag, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteEntityExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->entityName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ENTITY]'); - $etag = 'etag3123477'; - $request = (new DeleteEntityRequest()) - ->setName($formattedName) - ->setEtag($etag); - try { - $gapicClient->deleteEntity($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deletePartitionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->partitionName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ENTITY]', '[PARTITION]'); - $request = (new DeletePartitionRequest()) - ->setName($formattedName); - $gapicClient->deletePartition($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.MetadataService/DeletePartition', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deletePartitionExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->partitionName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ENTITY]', '[PARTITION]'); - $request = (new DeletePartitionRequest()) - ->setName($formattedName); - try { - $gapicClient->deletePartition($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getEntityTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $id = 'id3355'; - $etag = 'etag3123477'; - $asset = 'asset93121264'; - $dataPath = 'dataPath-363501670'; - $dataPathPattern = 'dataPathPattern-594427925'; - $catalogEntry = 'catalogEntry-1234004788'; - $uid = 'uid115792'; - $expectedResponse = new Entity(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setId($id); - $expectedResponse->setEtag($etag); - $expectedResponse->setAsset($asset); - $expectedResponse->setDataPath($dataPath); - $expectedResponse->setDataPathPattern($dataPathPattern); - $expectedResponse->setCatalogEntry($catalogEntry); - $expectedResponse->setUid($uid); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->entityName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ENTITY]'); - $request = (new GetEntityRequest()) - ->setName($formattedName); - $response = $gapicClient->getEntity($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.MetadataService/GetEntity', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getEntityExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->entityName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ENTITY]'); - $request = (new GetEntityRequest()) - ->setName($formattedName); - try { - $gapicClient->getEntity($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getPartitionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $location = 'location1901043637'; - $etag = 'etag3123477'; - $expectedResponse = new Partition(); - $expectedResponse->setName($name2); - $expectedResponse->setLocation($location); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->partitionName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ENTITY]', '[PARTITION]'); - $request = (new GetPartitionRequest()) - ->setName($formattedName); - $response = $gapicClient->getPartition($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.MetadataService/GetPartition', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getPartitionExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->partitionName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ENTITY]', '[PARTITION]'); - $request = (new GetPartitionRequest()) - ->setName($formattedName); - try { - $gapicClient->getPartition($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listEntitiesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $entitiesElement = new Entity(); - $entities = [ - $entitiesElement, - ]; - $expectedResponse = new ListEntitiesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setEntities($entities); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); - $view = EntityView::ENTITY_VIEW_UNSPECIFIED; - $request = (new ListEntitiesRequest()) - ->setParent($formattedParent) - ->setView($view); - $response = $gapicClient->listEntities($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getEntities()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.MetadataService/ListEntities', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getView(); - $this->assertProtobufEquals($view, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listEntitiesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); - $view = EntityView::ENTITY_VIEW_UNSPECIFIED; - $request = (new ListEntitiesRequest()) - ->setParent($formattedParent) - ->setView($view); - try { - $gapicClient->listEntities($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listPartitionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $partitionsElement = new Partition(); - $partitions = [ - $partitionsElement, - ]; - $expectedResponse = new ListPartitionsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setPartitions($partitions); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->entityName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ENTITY]'); - $request = (new ListPartitionsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listPartitions($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getPartitions()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.MetadataService/ListPartitions', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listPartitionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->entityName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ENTITY]'); - $request = (new ListPartitionsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listPartitions($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateEntityTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $id = 'id3355'; - $etag = 'etag3123477'; - $asset = 'asset93121264'; - $dataPath = 'dataPath-363501670'; - $dataPathPattern = 'dataPathPattern-594427925'; - $catalogEntry = 'catalogEntry-1234004788'; - $uid = 'uid115792'; - $expectedResponse = new Entity(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setId($id); - $expectedResponse->setEtag($etag); - $expectedResponse->setAsset($asset); - $expectedResponse->setDataPath($dataPath); - $expectedResponse->setDataPathPattern($dataPathPattern); - $expectedResponse->setCatalogEntry($catalogEntry); - $expectedResponse->setUid($uid); - $transport->addResponse($expectedResponse); - // Mock request - $entity = new Entity(); - $entityId = 'entityId-2102099874'; - $entity->setId($entityId); - $entityType = Type::TYPE_UNSPECIFIED; - $entity->setType($entityType); - $entityAsset = 'entityAsset1253969101'; - $entity->setAsset($entityAsset); - $entityDataPath = 'entityDataPath1530173426'; - $entity->setDataPath($entityDataPath); - $entitySystem = StorageSystem::STORAGE_SYSTEM_UNSPECIFIED; - $entity->setSystem($entitySystem); - $entityFormat = new StorageFormat(); - $formatMimeType = 'formatMimeType-1419746651'; - $entityFormat->setMimeType($formatMimeType); - $entity->setFormat($entityFormat); - $entitySchema = new Schema(); - $schemaUserManaged = false; - $entitySchema->setUserManaged($schemaUserManaged); - $entity->setSchema($entitySchema); - $request = (new UpdateEntityRequest()) - ->setEntity($entity); - $response = $gapicClient->updateEntity($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.MetadataService/UpdateEntity', $actualFuncCall); - $actualValue = $actualRequestObject->getEntity(); - $this->assertProtobufEquals($entity, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateEntityExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $entity = new Entity(); - $entityId = 'entityId-2102099874'; - $entity->setId($entityId); - $entityType = Type::TYPE_UNSPECIFIED; - $entity->setType($entityType); - $entityAsset = 'entityAsset1253969101'; - $entity->setAsset($entityAsset); - $entityDataPath = 'entityDataPath1530173426'; - $entity->setDataPath($entityDataPath); - $entitySystem = StorageSystem::STORAGE_SYSTEM_UNSPECIFIED; - $entity->setSystem($entitySystem); - $entityFormat = new StorageFormat(); - $formatMimeType = 'formatMimeType-1419746651'; - $entityFormat->setMimeType($formatMimeType); - $entity->setFormat($entityFormat); - $entitySchema = new Schema(); - $schemaUserManaged = false; - $entitySchema->setUserManaged($schemaUserManaged); - $entity->setSchema($entitySchema); - $request = (new UpdateEntityRequest()) - ->setEntity($entity); - try { - $gapicClient->updateEntity($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - $response = $gapicClient->getIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - try { - $gapicClient->getIamPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - $response = $gapicClient->setIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPolicy(); - $this->assertProtobufEquals($policy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - try { - $gapicClient->setIamPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new TestIamPermissionsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - $response = $gapicClient->testIamPermissions($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPermissions(); - $this->assertProtobufEquals($permissions, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - try { - $gapicClient->testIamPermissions($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $locationId = 'locationId552319461'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Location(); - $expectedResponse->setName($name2); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - $request = new GetLocationRequest(); - $response = $gapicClient->getLocation($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new GetLocationRequest(); - try { - $gapicClient->getLocation($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; - $expectedResponse = new ListLocationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLocations($locations); - $transport->addResponse($expectedResponse); - $request = new ListLocationsRequest(); - $response = $gapicClient->listLocations($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new ListLocationsRequest(); - try { - $gapicClient->listLocations($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createEntityAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $id = 'id3355'; - $etag = 'etag3123477'; - $asset = 'asset93121264'; - $dataPath = 'dataPath-363501670'; - $dataPathPattern = 'dataPathPattern-594427925'; - $catalogEntry = 'catalogEntry-1234004788'; - $uid = 'uid115792'; - $expectedResponse = new Entity(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setId($id); - $expectedResponse->setEtag($etag); - $expectedResponse->setAsset($asset); - $expectedResponse->setDataPath($dataPath); - $expectedResponse->setDataPathPattern($dataPathPattern); - $expectedResponse->setCatalogEntry($catalogEntry); - $expectedResponse->setUid($uid); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); - $entity = new Entity(); - $entityId = 'entityId-2102099874'; - $entity->setId($entityId); - $entityType = Type::TYPE_UNSPECIFIED; - $entity->setType($entityType); - $entityAsset = 'entityAsset1253969101'; - $entity->setAsset($entityAsset); - $entityDataPath = 'entityDataPath1530173426'; - $entity->setDataPath($entityDataPath); - $entitySystem = StorageSystem::STORAGE_SYSTEM_UNSPECIFIED; - $entity->setSystem($entitySystem); - $entityFormat = new StorageFormat(); - $formatMimeType = 'formatMimeType-1419746651'; - $entityFormat->setMimeType($formatMimeType); - $entity->setFormat($entityFormat); - $entitySchema = new Schema(); - $schemaUserManaged = false; - $entitySchema->setUserManaged($schemaUserManaged); - $entity->setSchema($entitySchema); - $request = (new CreateEntityRequest()) - ->setParent($formattedParent) - ->setEntity($entity); - $response = $gapicClient->createEntityAsync($request)->wait(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.MetadataService/CreateEntity', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getEntity(); - $this->assertProtobufEquals($entity, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Dataplex/v1/tests/Unit/V1/ContentServiceClientTest.php b/owl-bot-staging/Dataplex/v1/tests/Unit/V1/ContentServiceClientTest.php deleted file mode 100644 index 3c14f8d528be..000000000000 --- a/owl-bot-staging/Dataplex/v1/tests/Unit/V1/ContentServiceClientTest.php +++ /dev/null @@ -1,731 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return ContentServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new ContentServiceClient($options); - } - - /** @test */ - public function createContentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $uid = 'uid115792'; - $path = 'path3433509'; - $description = 'description-1724546052'; - $dataText = 'dataText-363378526'; - $expectedResponse = new Content(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setPath($path); - $expectedResponse->setDescription($description); - $expectedResponse->setDataText($dataText); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - $content = new Content(); - $contentPath = 'contentPath-389273538'; - $content->setPath($contentPath); - $contentDataText = 'contentDataText-82259056'; - $content->setDataText($contentDataText); - $response = $gapicClient->createContent($formattedParent, $content); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.ContentService/CreateContent', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getContent(); - $this->assertProtobufEquals($content, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createContentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - $content = new Content(); - $contentPath = 'contentPath-389273538'; - $content->setPath($contentPath); - $contentDataText = 'contentDataText-82259056'; - $content->setDataText($contentDataText); - try { - $gapicClient->createContent($formattedParent, $content); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteContentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->contentName('[PROJECT]', '[LOCATION]', '[LAKE]', '[CONTENT]'); - $gapicClient->deleteContent($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.ContentService/DeleteContent', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteContentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->contentName('[PROJECT]', '[LOCATION]', '[LAKE]', '[CONTENT]'); - try { - $gapicClient->deleteContent($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getContentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $path = 'path3433509'; - $description = 'description-1724546052'; - $dataText = 'dataText-363378526'; - $expectedResponse = new Content(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setPath($path); - $expectedResponse->setDescription($description); - $expectedResponse->setDataText($dataText); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->contentName('[PROJECT]', '[LOCATION]', '[LAKE]', '[CONTENT]'); - $response = $gapicClient->getContent($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.ContentService/GetContent', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getContentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->contentName('[PROJECT]', '[LOCATION]', '[LAKE]', '[CONTENT]'); - try { - $gapicClient->getContent($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $response = $gapicClient->getIamPolicy($resource); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.ContentService/GetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - try { - $gapicClient->getIamPolicy($resource); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listContentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $contentElement = new Content(); - $content = [ - $contentElement, - ]; - $expectedResponse = new ListContentResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setContent($content); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - $response = $gapicClient->listContent($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getContent()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.ContentService/ListContent', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listContentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - try { - $gapicClient->listContent($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $response = $gapicClient->setIamPolicy($resource, $policy); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.ContentService/SetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPolicy(); - $this->assertProtobufEquals($policy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - try { - $gapicClient->setIamPolicy($resource, $policy); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new TestIamPermissionsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $response = $gapicClient->testIamPermissions($resource, $permissions); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.ContentService/TestIamPermissions', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPermissions(); - $this->assertProtobufEquals($permissions, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - try { - $gapicClient->testIamPermissions($resource, $permissions); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateContentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $uid = 'uid115792'; - $path = 'path3433509'; - $description = 'description-1724546052'; - $dataText = 'dataText-363378526'; - $expectedResponse = new Content(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setPath($path); - $expectedResponse->setDescription($description); - $expectedResponse->setDataText($dataText); - $transport->addResponse($expectedResponse); - // Mock request - $updateMask = new FieldMask(); - $content = new Content(); - $contentPath = 'contentPath-389273538'; - $content->setPath($contentPath); - $contentDataText = 'contentDataText-82259056'; - $content->setDataText($contentDataText); - $response = $gapicClient->updateContent($updateMask, $content); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.ContentService/UpdateContent', $actualFuncCall); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualRequestObject->getContent(); - $this->assertProtobufEquals($content, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateContentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $updateMask = new FieldMask(); - $content = new Content(); - $contentPath = 'contentPath-389273538'; - $content->setPath($contentPath); - $contentDataText = 'contentDataText-82259056'; - $content->setDataText($contentDataText); - try { - $gapicClient->updateContent($updateMask, $content); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $locationId = 'locationId552319461'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Location(); - $expectedResponse->setName($name2); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - $response = $gapicClient->getLocation(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - try { - $gapicClient->getLocation(); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; - $expectedResponse = new ListLocationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLocations($locations); - $transport->addResponse($expectedResponse); - $response = $gapicClient->listLocations(); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - try { - $gapicClient->listLocations(); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Dataplex/v1/tests/Unit/V1/DataScanServiceClientTest.php b/owl-bot-staging/Dataplex/v1/tests/Unit/V1/DataScanServiceClientTest.php deleted file mode 100644 index 2aae4d0c19ab..000000000000 --- a/owl-bot-staging/Dataplex/v1/tests/Unit/V1/DataScanServiceClientTest.php +++ /dev/null @@ -1,1156 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return DataScanServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new DataScanServiceClient($options); - } - - /** @test */ - public function createDataScanTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createDataScanTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $expectedResponse = new DataScan(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createDataScanTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $dataScan = new DataScan(); - $dataScanData = new DataSource(); - $dataScan->setData($dataScanData); - $dataScanId = 'dataScanId1236798088'; - $response = $gapicClient->createDataScan($formattedParent, $dataScan, $dataScanId); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataScanService/CreateDataScan', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getDataScan(); - $this->assertProtobufEquals($dataScan, $actualValue); - $actualValue = $actualApiRequestObject->getDataScanId(); - $this->assertProtobufEquals($dataScanId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createDataScanTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createDataScanExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createDataScanTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $dataScan = new DataScan(); - $dataScanData = new DataSource(); - $dataScan->setData($dataScanData); - $dataScanId = 'dataScanId1236798088'; - $response = $gapicClient->createDataScan($formattedParent, $dataScan, $dataScanId); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createDataScanTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteDataScanTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteDataScanTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteDataScanTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->dataScanName('[PROJECT]', '[LOCATION]', '[DATASCAN]'); - $response = $gapicClient->deleteDataScan($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataScanService/DeleteDataScan', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteDataScanTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteDataScanExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteDataScanTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->dataScanName('[PROJECT]', '[LOCATION]', '[DATASCAN]'); - $response = $gapicClient->deleteDataScan($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteDataScanTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function generateDataQualityRulesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GenerateDataQualityRulesResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $response = $gapicClient->generateDataQualityRules($name); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataScanService/GenerateDataQualityRules', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function generateDataQualityRulesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $name = 'name3373707'; - try { - $gapicClient->generateDataQualityRules($name); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDataScanTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $expectedResponse = new DataScan(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->dataScanName('[PROJECT]', '[LOCATION]', '[DATASCAN]'); - $response = $gapicClient->getDataScan($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataScanService/GetDataScan', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDataScanExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->dataScanName('[PROJECT]', '[LOCATION]', '[DATASCAN]'); - try { - $gapicClient->getDataScan($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDataScanJobTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $message = 'message954925063'; - $expectedResponse = new DataScanJob(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setMessage($message); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->dataScanJobName('[PROJECT]', '[LOCATION]', '[DATASCAN]', '[JOB]'); - $response = $gapicClient->getDataScanJob($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataScanService/GetDataScanJob', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDataScanJobExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->dataScanJobName('[PROJECT]', '[LOCATION]', '[DATASCAN]', '[JOB]'); - try { - $gapicClient->getDataScanJob($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDataScanJobsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $dataScanJobsElement = new DataScanJob(); - $dataScanJobs = [ - $dataScanJobsElement, - ]; - $expectedResponse = new ListDataScanJobsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setDataScanJobs($dataScanJobs); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->dataScanName('[PROJECT]', '[LOCATION]', '[DATASCAN]'); - $response = $gapicClient->listDataScanJobs($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getDataScanJobs()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataScanService/ListDataScanJobs', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDataScanJobsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->dataScanName('[PROJECT]', '[LOCATION]', '[DATASCAN]'); - try { - $gapicClient->listDataScanJobs($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDataScansTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $dataScansElement = new DataScan(); - $dataScans = [ - $dataScansElement, - ]; - $expectedResponse = new ListDataScansResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setDataScans($dataScans); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->listDataScans($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getDataScans()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataScanService/ListDataScans', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDataScansExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - try { - $gapicClient->listDataScans($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function runDataScanTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new RunDataScanResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->dataScanName('[PROJECT]', '[LOCATION]', '[DATASCAN]'); - $response = $gapicClient->runDataScan($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataScanService/RunDataScan', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function runDataScanExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->dataScanName('[PROJECT]', '[LOCATION]', '[DATASCAN]'); - try { - $gapicClient->runDataScan($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateDataScanTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateDataScanTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $expectedResponse = new DataScan(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateDataScanTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $dataScan = new DataScan(); - $dataScanData = new DataSource(); - $dataScan->setData($dataScanData); - $updateMask = new FieldMask(); - $response = $gapicClient->updateDataScan($dataScan, $updateMask); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataScanService/UpdateDataScan', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getDataScan(); - $this->assertProtobufEquals($dataScan, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateDataScanTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateDataScanExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateDataScanTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $dataScan = new DataScan(); - $dataScanData = new DataSource(); - $dataScan->setData($dataScanData); - $updateMask = new FieldMask(); - $response = $gapicClient->updateDataScan($dataScan, $updateMask); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateDataScanTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $response = $gapicClient->getIamPolicy($resource); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - try { - $gapicClient->getIamPolicy($resource); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $response = $gapicClient->setIamPolicy($resource, $policy); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPolicy(); - $this->assertProtobufEquals($policy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - try { - $gapicClient->setIamPolicy($resource, $policy); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new TestIamPermissionsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $response = $gapicClient->testIamPermissions($resource, $permissions); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPermissions(); - $this->assertProtobufEquals($permissions, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - try { - $gapicClient->testIamPermissions($resource, $permissions); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $locationId = 'locationId552319461'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Location(); - $expectedResponse->setName($name2); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - $response = $gapicClient->getLocation(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - try { - $gapicClient->getLocation(); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; - $expectedResponse = new ListLocationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLocations($locations); - $transport->addResponse($expectedResponse); - $response = $gapicClient->listLocations(); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - try { - $gapicClient->listLocations(); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Dataplex/v1/tests/Unit/V1/DataTaxonomyServiceClientTest.php b/owl-bot-staging/Dataplex/v1/tests/Unit/V1/DataTaxonomyServiceClientTest.php deleted file mode 100644 index cc882652514e..000000000000 --- a/owl-bot-staging/Dataplex/v1/tests/Unit/V1/DataTaxonomyServiceClientTest.php +++ /dev/null @@ -1,1977 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return DataTaxonomyServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new DataTaxonomyServiceClient($options); - } - - /** @test */ - public function createDataAttributeTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createDataAttributeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $parentId = 'parentId2070327504'; - $attributeCount = 688916052; - $etag = 'etag3123477'; - $expectedResponse = new DataAttribute(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setParentId($parentId); - $expectedResponse->setAttributeCount($attributeCount); - $expectedResponse->setEtag($etag); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createDataAttributeTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->dataTaxonomyName('[PROJECT]', '[LOCATION]', '[DATA_TAXONOMY_ID]'); - $dataAttributeId = 'dataAttributeId-1927466989'; - $dataAttribute = new DataAttribute(); - $response = $gapicClient->createDataAttribute($formattedParent, $dataAttributeId, $dataAttribute); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataTaxonomyService/CreateDataAttribute', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getDataAttributeId(); - $this->assertProtobufEquals($dataAttributeId, $actualValue); - $actualValue = $actualApiRequestObject->getDataAttribute(); - $this->assertProtobufEquals($dataAttribute, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createDataAttributeTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createDataAttributeExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createDataAttributeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->dataTaxonomyName('[PROJECT]', '[LOCATION]', '[DATA_TAXONOMY_ID]'); - $dataAttributeId = 'dataAttributeId-1927466989'; - $dataAttribute = new DataAttribute(); - $response = $gapicClient->createDataAttribute($formattedParent, $dataAttributeId, $dataAttribute); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createDataAttributeTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createDataAttributeBindingTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createDataAttributeBindingTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $etag = 'etag3123477'; - $resource = 'resource-341064690'; - $expectedResponse = new DataAttributeBinding(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setEtag($etag); - $expectedResponse->setResource($resource); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createDataAttributeBindingTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $dataAttributeBindingId = 'dataAttributeBindingId863052813'; - $dataAttributeBinding = new DataAttributeBinding(); - $response = $gapicClient->createDataAttributeBinding($formattedParent, $dataAttributeBindingId, $dataAttributeBinding); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataTaxonomyService/CreateDataAttributeBinding', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getDataAttributeBindingId(); - $this->assertProtobufEquals($dataAttributeBindingId, $actualValue); - $actualValue = $actualApiRequestObject->getDataAttributeBinding(); - $this->assertProtobufEquals($dataAttributeBinding, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createDataAttributeBindingTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createDataAttributeBindingExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createDataAttributeBindingTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $dataAttributeBindingId = 'dataAttributeBindingId863052813'; - $dataAttributeBinding = new DataAttributeBinding(); - $response = $gapicClient->createDataAttributeBinding($formattedParent, $dataAttributeBindingId, $dataAttributeBinding); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createDataAttributeBindingTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createDataTaxonomyTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createDataTaxonomyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $attributeCount = 688916052; - $etag = 'etag3123477'; - $classCount = 424516728; - $expectedResponse = new DataTaxonomy(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setAttributeCount($attributeCount); - $expectedResponse->setEtag($etag); - $expectedResponse->setClassCount($classCount); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createDataTaxonomyTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $dataTaxonomyId = 'dataTaxonomyId-857059404'; - $dataTaxonomy = new DataTaxonomy(); - $response = $gapicClient->createDataTaxonomy($formattedParent, $dataTaxonomyId, $dataTaxonomy); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataTaxonomyService/CreateDataTaxonomy', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getDataTaxonomyId(); - $this->assertProtobufEquals($dataTaxonomyId, $actualValue); - $actualValue = $actualApiRequestObject->getDataTaxonomy(); - $this->assertProtobufEquals($dataTaxonomy, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createDataTaxonomyTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createDataTaxonomyExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createDataTaxonomyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $dataTaxonomyId = 'dataTaxonomyId-857059404'; - $dataTaxonomy = new DataTaxonomy(); - $response = $gapicClient->createDataTaxonomy($formattedParent, $dataTaxonomyId, $dataTaxonomy); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createDataTaxonomyTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteDataAttributeTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteDataAttributeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteDataAttributeTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->dataAttributeName('[PROJECT]', '[LOCATION]', '[DATATAXONOMY]', '[DATA_ATTRIBUTE_ID]'); - $response = $gapicClient->deleteDataAttribute($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataTaxonomyService/DeleteDataAttribute', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteDataAttributeTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteDataAttributeExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteDataAttributeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->dataAttributeName('[PROJECT]', '[LOCATION]', '[DATATAXONOMY]', '[DATA_ATTRIBUTE_ID]'); - $response = $gapicClient->deleteDataAttribute($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteDataAttributeTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteDataAttributeBindingTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteDataAttributeBindingTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteDataAttributeBindingTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->dataAttributeBindingName('[PROJECT]', '[LOCATION]', '[DATA_ATTRIBUTE_BINDING_ID]'); - $etag = 'etag3123477'; - $response = $gapicClient->deleteDataAttributeBinding($formattedName, $etag); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataTaxonomyService/DeleteDataAttributeBinding', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualApiRequestObject->getEtag(); - $this->assertProtobufEquals($etag, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteDataAttributeBindingTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteDataAttributeBindingExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteDataAttributeBindingTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->dataAttributeBindingName('[PROJECT]', '[LOCATION]', '[DATA_ATTRIBUTE_BINDING_ID]'); - $etag = 'etag3123477'; - $response = $gapicClient->deleteDataAttributeBinding($formattedName, $etag); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteDataAttributeBindingTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteDataTaxonomyTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteDataTaxonomyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteDataTaxonomyTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->dataTaxonomyName('[PROJECT]', '[LOCATION]', '[DATA_TAXONOMY_ID]'); - $response = $gapicClient->deleteDataTaxonomy($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataTaxonomyService/DeleteDataTaxonomy', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteDataTaxonomyTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteDataTaxonomyExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteDataTaxonomyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->dataTaxonomyName('[PROJECT]', '[LOCATION]', '[DATA_TAXONOMY_ID]'); - $response = $gapicClient->deleteDataTaxonomy($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteDataTaxonomyTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getDataAttributeTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $parentId = 'parentId2070327504'; - $attributeCount = 688916052; - $etag = 'etag3123477'; - $expectedResponse = new DataAttribute(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setParentId($parentId); - $expectedResponse->setAttributeCount($attributeCount); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->dataAttributeName('[PROJECT]', '[LOCATION]', '[DATATAXONOMY]', '[DATA_ATTRIBUTE_ID]'); - $response = $gapicClient->getDataAttribute($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataTaxonomyService/GetDataAttribute', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDataAttributeExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->dataAttributeName('[PROJECT]', '[LOCATION]', '[DATATAXONOMY]', '[DATA_ATTRIBUTE_ID]'); - try { - $gapicClient->getDataAttribute($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDataAttributeBindingTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $etag = 'etag3123477'; - $resource = 'resource-341064690'; - $expectedResponse = new DataAttributeBinding(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setEtag($etag); - $expectedResponse->setResource($resource); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->dataAttributeBindingName('[PROJECT]', '[LOCATION]', '[DATA_ATTRIBUTE_BINDING_ID]'); - $response = $gapicClient->getDataAttributeBinding($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataTaxonomyService/GetDataAttributeBinding', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDataAttributeBindingExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->dataAttributeBindingName('[PROJECT]', '[LOCATION]', '[DATA_ATTRIBUTE_BINDING_ID]'); - try { - $gapicClient->getDataAttributeBinding($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDataTaxonomyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $attributeCount = 688916052; - $etag = 'etag3123477'; - $classCount = 424516728; - $expectedResponse = new DataTaxonomy(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setAttributeCount($attributeCount); - $expectedResponse->setEtag($etag); - $expectedResponse->setClassCount($classCount); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->dataTaxonomyName('[PROJECT]', '[LOCATION]', '[DATA_TAXONOMY_ID]'); - $response = $gapicClient->getDataTaxonomy($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataTaxonomyService/GetDataTaxonomy', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDataTaxonomyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->dataTaxonomyName('[PROJECT]', '[LOCATION]', '[DATA_TAXONOMY_ID]'); - try { - $gapicClient->getDataTaxonomy($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDataAttributeBindingsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $dataAttributeBindingsElement = new DataAttributeBinding(); - $dataAttributeBindings = [ - $dataAttributeBindingsElement, - ]; - $expectedResponse = new ListDataAttributeBindingsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setDataAttributeBindings($dataAttributeBindings); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->listDataAttributeBindings($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getDataAttributeBindings()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataTaxonomyService/ListDataAttributeBindings', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDataAttributeBindingsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - try { - $gapicClient->listDataAttributeBindings($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDataAttributesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $dataAttributesElement = new DataAttribute(); - $dataAttributes = [ - $dataAttributesElement, - ]; - $expectedResponse = new ListDataAttributesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setDataAttributes($dataAttributes); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->dataTaxonomyName('[PROJECT]', '[LOCATION]', '[DATA_TAXONOMY_ID]'); - $response = $gapicClient->listDataAttributes($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getDataAttributes()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataTaxonomyService/ListDataAttributes', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDataAttributesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->dataTaxonomyName('[PROJECT]', '[LOCATION]', '[DATA_TAXONOMY_ID]'); - try { - $gapicClient->listDataAttributes($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDataTaxonomiesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $dataTaxonomiesElement = new DataTaxonomy(); - $dataTaxonomies = [ - $dataTaxonomiesElement, - ]; - $expectedResponse = new ListDataTaxonomiesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setDataTaxonomies($dataTaxonomies); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->listDataTaxonomies($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getDataTaxonomies()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataTaxonomyService/ListDataTaxonomies', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDataTaxonomiesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - try { - $gapicClient->listDataTaxonomies($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateDataAttributeTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateDataAttributeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $parentId = 'parentId2070327504'; - $attributeCount = 688916052; - $etag = 'etag3123477'; - $expectedResponse = new DataAttribute(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setParentId($parentId); - $expectedResponse->setAttributeCount($attributeCount); - $expectedResponse->setEtag($etag); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateDataAttributeTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $updateMask = new FieldMask(); - $dataAttribute = new DataAttribute(); - $response = $gapicClient->updateDataAttribute($updateMask, $dataAttribute); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataTaxonomyService/UpdateDataAttribute', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualApiRequestObject->getDataAttribute(); - $this->assertProtobufEquals($dataAttribute, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateDataAttributeTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateDataAttributeExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateDataAttributeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $updateMask = new FieldMask(); - $dataAttribute = new DataAttribute(); - $response = $gapicClient->updateDataAttribute($updateMask, $dataAttribute); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateDataAttributeTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateDataAttributeBindingTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateDataAttributeBindingTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $etag = 'etag3123477'; - $resource = 'resource-341064690'; - $expectedResponse = new DataAttributeBinding(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setEtag($etag); - $expectedResponse->setResource($resource); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateDataAttributeBindingTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $updateMask = new FieldMask(); - $dataAttributeBinding = new DataAttributeBinding(); - $response = $gapicClient->updateDataAttributeBinding($updateMask, $dataAttributeBinding); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataTaxonomyService/UpdateDataAttributeBinding', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualApiRequestObject->getDataAttributeBinding(); - $this->assertProtobufEquals($dataAttributeBinding, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateDataAttributeBindingTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateDataAttributeBindingExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateDataAttributeBindingTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $updateMask = new FieldMask(); - $dataAttributeBinding = new DataAttributeBinding(); - $response = $gapicClient->updateDataAttributeBinding($updateMask, $dataAttributeBinding); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateDataAttributeBindingTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateDataTaxonomyTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateDataTaxonomyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $attributeCount = 688916052; - $etag = 'etag3123477'; - $classCount = 424516728; - $expectedResponse = new DataTaxonomy(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setAttributeCount($attributeCount); - $expectedResponse->setEtag($etag); - $expectedResponse->setClassCount($classCount); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateDataTaxonomyTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $updateMask = new FieldMask(); - $dataTaxonomy = new DataTaxonomy(); - $response = $gapicClient->updateDataTaxonomy($updateMask, $dataTaxonomy); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataTaxonomyService/UpdateDataTaxonomy', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualApiRequestObject->getDataTaxonomy(); - $this->assertProtobufEquals($dataTaxonomy, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateDataTaxonomyTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateDataTaxonomyExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateDataTaxonomyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $updateMask = new FieldMask(); - $dataTaxonomy = new DataTaxonomy(); - $response = $gapicClient->updateDataTaxonomy($updateMask, $dataTaxonomy); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateDataTaxonomyTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $response = $gapicClient->getIamPolicy($resource); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - try { - $gapicClient->getIamPolicy($resource); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $response = $gapicClient->setIamPolicy($resource, $policy); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPolicy(); - $this->assertProtobufEquals($policy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - try { - $gapicClient->setIamPolicy($resource, $policy); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new TestIamPermissionsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $response = $gapicClient->testIamPermissions($resource, $permissions); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPermissions(); - $this->assertProtobufEquals($permissions, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - try { - $gapicClient->testIamPermissions($resource, $permissions); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $locationId = 'locationId552319461'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Location(); - $expectedResponse->setName($name2); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - $response = $gapicClient->getLocation(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - try { - $gapicClient->getLocation(); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; - $expectedResponse = new ListLocationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLocations($locations); - $transport->addResponse($expectedResponse); - $response = $gapicClient->listLocations(); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - try { - $gapicClient->listLocations(); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Dataplex/v1/tests/Unit/V1/DataplexServiceClientTest.php b/owl-bot-staging/Dataplex/v1/tests/Unit/V1/DataplexServiceClientTest.php deleted file mode 100644 index 7f5f38d18d21..000000000000 --- a/owl-bot-staging/Dataplex/v1/tests/Unit/V1/DataplexServiceClientTest.php +++ /dev/null @@ -1,3594 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return DataplexServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new DataplexServiceClient($options); - } - - /** @test */ - public function cancelJobTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->jobName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]', '[JOB]'); - $gapicClient->cancelJob($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/CancelJob', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function cancelJobExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->jobName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]', '[JOB]'); - try { - $gapicClient->cancelJob($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createAssetTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createAssetTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $expectedResponse = new Asset(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createAssetTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); - $assetId = 'assetId-373202742'; - $asset = new Asset(); - $assetResourceSpec = new ResourceSpec(); - $resourceSpecType = Type::TYPE_UNSPECIFIED; - $assetResourceSpec->setType($resourceSpecType); - $asset->setResourceSpec($assetResourceSpec); - $response = $gapicClient->createAsset($formattedParent, $assetId, $asset); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/CreateAsset', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getAssetId(); - $this->assertProtobufEquals($assetId, $actualValue); - $actualValue = $actualApiRequestObject->getAsset(); - $this->assertProtobufEquals($asset, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAssetTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createAssetExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createAssetTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); - $assetId = 'assetId-373202742'; - $asset = new Asset(); - $assetResourceSpec = new ResourceSpec(); - $resourceSpecType = Type::TYPE_UNSPECIFIED; - $assetResourceSpec->setType($resourceSpecType); - $asset->setResourceSpec($assetResourceSpec); - $response = $gapicClient->createAsset($formattedParent, $assetId, $asset); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAssetTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createEnvironmentTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createEnvironmentTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $expectedResponse = new Environment(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createEnvironmentTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - $environmentId = 'environmentId608412359'; - $environment = new Environment(); - $environmentInfrastructureSpec = new InfrastructureSpec(); - $infrastructureSpecOsImage = new OsImageRuntime(); - $osImageImageVersion = 'osImageImageVersion-831593868'; - $infrastructureSpecOsImage->setImageVersion($osImageImageVersion); - $environmentInfrastructureSpec->setOsImage($infrastructureSpecOsImage); - $environment->setInfrastructureSpec($environmentInfrastructureSpec); - $response = $gapicClient->createEnvironment($formattedParent, $environmentId, $environment); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/CreateEnvironment', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getEnvironmentId(); - $this->assertProtobufEquals($environmentId, $actualValue); - $actualValue = $actualApiRequestObject->getEnvironment(); - $this->assertProtobufEquals($environment, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createEnvironmentTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createEnvironmentExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createEnvironmentTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - $environmentId = 'environmentId608412359'; - $environment = new Environment(); - $environmentInfrastructureSpec = new InfrastructureSpec(); - $infrastructureSpecOsImage = new OsImageRuntime(); - $osImageImageVersion = 'osImageImageVersion-831593868'; - $infrastructureSpecOsImage->setImageVersion($osImageImageVersion); - $environmentInfrastructureSpec->setOsImage($infrastructureSpecOsImage); - $environment->setInfrastructureSpec($environmentInfrastructureSpec); - $response = $gapicClient->createEnvironment($formattedParent, $environmentId, $environment); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createEnvironmentTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createLakeTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createLakeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $serviceAccount = 'serviceAccount-1948028253'; - $expectedResponse = new Lake(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setServiceAccount($serviceAccount); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createLakeTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $lakeId = 'lakeId-54902325'; - $lake = new Lake(); - $response = $gapicClient->createLake($formattedParent, $lakeId, $lake); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/CreateLake', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getLakeId(); - $this->assertProtobufEquals($lakeId, $actualValue); - $actualValue = $actualApiRequestObject->getLake(); - $this->assertProtobufEquals($lake, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createLakeTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createLakeExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createLakeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $lakeId = 'lakeId-54902325'; - $lake = new Lake(); - $response = $gapicClient->createLake($formattedParent, $lakeId, $lake); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createLakeTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createTaskTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createTaskTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Task(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createTaskTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - $taskId = 'taskId-1537240555'; - $task = new Task(); - $taskTriggerSpec = new TriggerSpec(); - $triggerSpecType = \Google\Cloud\Dataplex\V1\Task\TriggerSpec\Type::TYPE_UNSPECIFIED; - $taskTriggerSpec->setType($triggerSpecType); - $task->setTriggerSpec($taskTriggerSpec); - $taskExecutionSpec = new ExecutionSpec(); - $executionSpecServiceAccount = 'executionSpecServiceAccount-1249728629'; - $taskExecutionSpec->setServiceAccount($executionSpecServiceAccount); - $task->setExecutionSpec($taskExecutionSpec); - $response = $gapicClient->createTask($formattedParent, $taskId, $task); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/CreateTask', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getTaskId(); - $this->assertProtobufEquals($taskId, $actualValue); - $actualValue = $actualApiRequestObject->getTask(); - $this->assertProtobufEquals($task, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createTaskTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createTaskExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createTaskTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - $taskId = 'taskId-1537240555'; - $task = new Task(); - $taskTriggerSpec = new TriggerSpec(); - $triggerSpecType = \Google\Cloud\Dataplex\V1\Task\TriggerSpec\Type::TYPE_UNSPECIFIED; - $taskTriggerSpec->setType($triggerSpecType); - $task->setTriggerSpec($taskTriggerSpec); - $taskExecutionSpec = new ExecutionSpec(); - $executionSpecServiceAccount = 'executionSpecServiceAccount-1249728629'; - $taskExecutionSpec->setServiceAccount($executionSpecServiceAccount); - $task->setExecutionSpec($taskExecutionSpec); - $response = $gapicClient->createTask($formattedParent, $taskId, $task); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createTaskTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createZoneTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createZoneTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $expectedResponse = new Zone(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createZoneTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - $zoneId = 'zoneId-111174002'; - $zone = new Zone(); - $zoneType = \Google\Cloud\Dataplex\V1\Zone\Type::TYPE_UNSPECIFIED; - $zone->setType($zoneType); - $zoneResourceSpec = new \Google\Cloud\Dataplex\V1\Zone\ResourceSpec(); - $resourceSpecLocationType = LocationType::LOCATION_TYPE_UNSPECIFIED; - $zoneResourceSpec->setLocationType($resourceSpecLocationType); - $zone->setResourceSpec($zoneResourceSpec); - $response = $gapicClient->createZone($formattedParent, $zoneId, $zone); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/CreateZone', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getZoneId(); - $this->assertProtobufEquals($zoneId, $actualValue); - $actualValue = $actualApiRequestObject->getZone(); - $this->assertProtobufEquals($zone, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createZoneTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createZoneExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createZoneTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - $zoneId = 'zoneId-111174002'; - $zone = new Zone(); - $zoneType = \Google\Cloud\Dataplex\V1\Zone\Type::TYPE_UNSPECIFIED; - $zone->setType($zoneType); - $zoneResourceSpec = new \Google\Cloud\Dataplex\V1\Zone\ResourceSpec(); - $resourceSpecLocationType = LocationType::LOCATION_TYPE_UNSPECIFIED; - $zoneResourceSpec->setLocationType($resourceSpecLocationType); - $zone->setResourceSpec($zoneResourceSpec); - $response = $gapicClient->createZone($formattedParent, $zoneId, $zone); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createZoneTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteAssetTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteAssetTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteAssetTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->assetName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ASSET]'); - $response = $gapicClient->deleteAsset($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/DeleteAsset', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteAssetTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteAssetExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteAssetTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->assetName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ASSET]'); - $response = $gapicClient->deleteAsset($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteAssetTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteEnvironmentTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteEnvironmentTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteEnvironmentTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->environmentName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ENVIRONMENT]'); - $response = $gapicClient->deleteEnvironment($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/DeleteEnvironment', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteEnvironmentTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteEnvironmentExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteEnvironmentTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->environmentName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ENVIRONMENT]'); - $response = $gapicClient->deleteEnvironment($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteEnvironmentTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteLakeTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteLakeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteLakeTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - $response = $gapicClient->deleteLake($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/DeleteLake', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteLakeTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteLakeExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteLakeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - $response = $gapicClient->deleteLake($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteLakeTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteTaskTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteTaskTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteTaskTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->taskName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]'); - $response = $gapicClient->deleteTask($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/DeleteTask', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteTaskTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteTaskExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteTaskTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->taskName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]'); - $response = $gapicClient->deleteTask($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteTaskTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteZoneTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteZoneTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteZoneTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); - $response = $gapicClient->deleteZone($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/DeleteZone', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteZoneTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteZoneExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteZoneTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); - $response = $gapicClient->deleteZone($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteZoneTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getAssetTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $expectedResponse = new Asset(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->assetName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ASSET]'); - $response = $gapicClient->getAsset($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/GetAsset', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAssetExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->assetName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ASSET]'); - try { - $gapicClient->getAsset($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getEnvironmentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $expectedResponse = new Environment(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->environmentName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ENVIRONMENT]'); - $response = $gapicClient->getEnvironment($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/GetEnvironment', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getEnvironmentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->environmentName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ENVIRONMENT]'); - try { - $gapicClient->getEnvironment($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getJobTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $retryCount = 928040776; - $serviceJob = 'serviceJob-1928057037'; - $message = 'message954925063'; - $expectedResponse = new Job(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setRetryCount($retryCount); - $expectedResponse->setServiceJob($serviceJob); - $expectedResponse->setMessage($message); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->jobName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]', '[JOB]'); - $response = $gapicClient->getJob($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/GetJob', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getJobExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->jobName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]', '[JOB]'); - try { - $gapicClient->getJob($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLakeTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $serviceAccount = 'serviceAccount-1948028253'; - $expectedResponse = new Lake(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setServiceAccount($serviceAccount); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - $response = $gapicClient->getLake($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/GetLake', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLakeExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - try { - $gapicClient->getLake($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getTaskTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Task(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->taskName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]'); - $response = $gapicClient->getTask($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/GetTask', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getTaskExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->taskName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]'); - try { - $gapicClient->getTask($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getZoneTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $expectedResponse = new Zone(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); - $response = $gapicClient->getZone($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/GetZone', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getZoneExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); - try { - $gapicClient->getZone($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAssetActionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $actionsElement = new Action(); - $actions = [ - $actionsElement, - ]; - $expectedResponse = new ListActionsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setActions($actions); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->assetName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ASSET]'); - $response = $gapicClient->listAssetActions($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getActions()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/ListAssetActions', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAssetActionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->assetName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ASSET]'); - try { - $gapicClient->listAssetActions($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAssetsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $assetsElement = new Asset(); - $assets = [ - $assetsElement, - ]; - $expectedResponse = new ListAssetsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setAssets($assets); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); - $response = $gapicClient->listAssets($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getAssets()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/ListAssets', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAssetsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); - try { - $gapicClient->listAssets($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listEnvironmentsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $environmentsElement = new Environment(); - $environments = [ - $environmentsElement, - ]; - $expectedResponse = new ListEnvironmentsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setEnvironments($environments); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - $response = $gapicClient->listEnvironments($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getEnvironments()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/ListEnvironments', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listEnvironmentsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - try { - $gapicClient->listEnvironments($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listJobsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $jobsElement = new Job(); - $jobs = [ - $jobsElement, - ]; - $expectedResponse = new ListJobsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setJobs($jobs); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->taskName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]'); - $response = $gapicClient->listJobs($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getJobs()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/ListJobs', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listJobsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->taskName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]'); - try { - $gapicClient->listJobs($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLakeActionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $actionsElement = new Action(); - $actions = [ - $actionsElement, - ]; - $expectedResponse = new ListActionsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setActions($actions); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - $response = $gapicClient->listLakeActions($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getActions()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/ListLakeActions', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLakeActionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - try { - $gapicClient->listLakeActions($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLakesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $lakesElement = new Lake(); - $lakes = [ - $lakesElement, - ]; - $expectedResponse = new ListLakesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLakes($lakes); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->listLakes($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLakes()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/ListLakes', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLakesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - try { - $gapicClient->listLakes($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listSessionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $sessionsElement = new Session(); - $sessions = [ - $sessionsElement, - ]; - $expectedResponse = new ListSessionsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setSessions($sessions); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->environmentName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ENVIRONMENT]'); - $response = $gapicClient->listSessions($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getSessions()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/ListSessions', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listSessionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->environmentName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ENVIRONMENT]'); - try { - $gapicClient->listSessions($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listTasksTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $tasksElement = new Task(); - $tasks = [ - $tasksElement, - ]; - $expectedResponse = new ListTasksResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setTasks($tasks); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - $response = $gapicClient->listTasks($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getTasks()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/ListTasks', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listTasksExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - try { - $gapicClient->listTasks($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listZoneActionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $actionsElement = new Action(); - $actions = [ - $actionsElement, - ]; - $expectedResponse = new ListActionsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setActions($actions); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); - $response = $gapicClient->listZoneActions($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getActions()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/ListZoneActions', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listZoneActionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); - try { - $gapicClient->listZoneActions($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listZonesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $zonesElement = new Zone(); - $zones = [ - $zonesElement, - ]; - $expectedResponse = new ListZonesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setZones($zones); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - $response = $gapicClient->listZones($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getZones()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/ListZones', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listZonesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->lakeName('[PROJECT]', '[LOCATION]', '[LAKE]'); - try { - $gapicClient->listZones($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function runTaskTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new RunTaskResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->taskName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]'); - $response = $gapicClient->runTask($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/RunTask', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function runTaskExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->taskName('[PROJECT]', '[LOCATION]', '[LAKE]', '[TASK]'); - try { - $gapicClient->runTask($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateAssetTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateAssetTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $expectedResponse = new Asset(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateAssetTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $updateMask = new FieldMask(); - $asset = new Asset(); - $assetResourceSpec = new ResourceSpec(); - $resourceSpecType = Type::TYPE_UNSPECIFIED; - $assetResourceSpec->setType($resourceSpecType); - $asset->setResourceSpec($assetResourceSpec); - $response = $gapicClient->updateAsset($updateMask, $asset); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/UpdateAsset', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualApiRequestObject->getAsset(); - $this->assertProtobufEquals($asset, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateAssetTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateAssetExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateAssetTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $updateMask = new FieldMask(); - $asset = new Asset(); - $assetResourceSpec = new ResourceSpec(); - $resourceSpecType = Type::TYPE_UNSPECIFIED; - $assetResourceSpec->setType($resourceSpecType); - $asset->setResourceSpec($assetResourceSpec); - $response = $gapicClient->updateAsset($updateMask, $asset); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateAssetTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateEnvironmentTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateEnvironmentTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $expectedResponse = new Environment(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateEnvironmentTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $updateMask = new FieldMask(); - $environment = new Environment(); - $environmentInfrastructureSpec = new InfrastructureSpec(); - $infrastructureSpecOsImage = new OsImageRuntime(); - $osImageImageVersion = 'osImageImageVersion-831593868'; - $infrastructureSpecOsImage->setImageVersion($osImageImageVersion); - $environmentInfrastructureSpec->setOsImage($infrastructureSpecOsImage); - $environment->setInfrastructureSpec($environmentInfrastructureSpec); - $response = $gapicClient->updateEnvironment($updateMask, $environment); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/UpdateEnvironment', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualApiRequestObject->getEnvironment(); - $this->assertProtobufEquals($environment, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateEnvironmentTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateEnvironmentExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateEnvironmentTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $updateMask = new FieldMask(); - $environment = new Environment(); - $environmentInfrastructureSpec = new InfrastructureSpec(); - $infrastructureSpecOsImage = new OsImageRuntime(); - $osImageImageVersion = 'osImageImageVersion-831593868'; - $infrastructureSpecOsImage->setImageVersion($osImageImageVersion); - $environmentInfrastructureSpec->setOsImage($infrastructureSpecOsImage); - $environment->setInfrastructureSpec($environmentInfrastructureSpec); - $response = $gapicClient->updateEnvironment($updateMask, $environment); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateEnvironmentTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateLakeTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateLakeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $serviceAccount = 'serviceAccount-1948028253'; - $expectedResponse = new Lake(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setServiceAccount($serviceAccount); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateLakeTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $updateMask = new FieldMask(); - $lake = new Lake(); - $response = $gapicClient->updateLake($updateMask, $lake); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/UpdateLake', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualApiRequestObject->getLake(); - $this->assertProtobufEquals($lake, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateLakeTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateLakeExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateLakeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $updateMask = new FieldMask(); - $lake = new Lake(); - $response = $gapicClient->updateLake($updateMask, $lake); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateLakeTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateTaskTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateTaskTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Task(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateTaskTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $updateMask = new FieldMask(); - $task = new Task(); - $taskTriggerSpec = new TriggerSpec(); - $triggerSpecType = \Google\Cloud\Dataplex\V1\Task\TriggerSpec\Type::TYPE_UNSPECIFIED; - $taskTriggerSpec->setType($triggerSpecType); - $task->setTriggerSpec($taskTriggerSpec); - $taskExecutionSpec = new ExecutionSpec(); - $executionSpecServiceAccount = 'executionSpecServiceAccount-1249728629'; - $taskExecutionSpec->setServiceAccount($executionSpecServiceAccount); - $task->setExecutionSpec($taskExecutionSpec); - $response = $gapicClient->updateTask($updateMask, $task); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/UpdateTask', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualApiRequestObject->getTask(); - $this->assertProtobufEquals($task, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateTaskTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateTaskExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateTaskTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $updateMask = new FieldMask(); - $task = new Task(); - $taskTriggerSpec = new TriggerSpec(); - $triggerSpecType = \Google\Cloud\Dataplex\V1\Task\TriggerSpec\Type::TYPE_UNSPECIFIED; - $taskTriggerSpec->setType($triggerSpecType); - $task->setTriggerSpec($taskTriggerSpec); - $taskExecutionSpec = new ExecutionSpec(); - $executionSpecServiceAccount = 'executionSpecServiceAccount-1249728629'; - $taskExecutionSpec->setServiceAccount($executionSpecServiceAccount); - $task->setExecutionSpec($taskExecutionSpec); - $response = $gapicClient->updateTask($updateMask, $task); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateTaskTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateZoneTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateZoneTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $expectedResponse = new Zone(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateZoneTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $updateMask = new FieldMask(); - $zone = new Zone(); - $zoneType = \Google\Cloud\Dataplex\V1\Zone\Type::TYPE_UNSPECIFIED; - $zone->setType($zoneType); - $zoneResourceSpec = new \Google\Cloud\Dataplex\V1\Zone\ResourceSpec(); - $resourceSpecLocationType = LocationType::LOCATION_TYPE_UNSPECIFIED; - $zoneResourceSpec->setLocationType($resourceSpecLocationType); - $zone->setResourceSpec($zoneResourceSpec); - $response = $gapicClient->updateZone($updateMask, $zone); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.DataplexService/UpdateZone', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualApiRequestObject->getZone(); - $this->assertProtobufEquals($zone, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateZoneTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateZoneExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateZoneTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $updateMask = new FieldMask(); - $zone = new Zone(); - $zoneType = \Google\Cloud\Dataplex\V1\Zone\Type::TYPE_UNSPECIFIED; - $zone->setType($zoneType); - $zoneResourceSpec = new \Google\Cloud\Dataplex\V1\Zone\ResourceSpec(); - $resourceSpecLocationType = LocationType::LOCATION_TYPE_UNSPECIFIED; - $zoneResourceSpec->setLocationType($resourceSpecLocationType); - $zone->setResourceSpec($zoneResourceSpec); - $response = $gapicClient->updateZone($updateMask, $zone); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateZoneTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $response = $gapicClient->getIamPolicy($resource); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - try { - $gapicClient->getIamPolicy($resource); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $response = $gapicClient->setIamPolicy($resource, $policy); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPolicy(); - $this->assertProtobufEquals($policy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - try { - $gapicClient->setIamPolicy($resource, $policy); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new TestIamPermissionsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $response = $gapicClient->testIamPermissions($resource, $permissions); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPermissions(); - $this->assertProtobufEquals($permissions, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - try { - $gapicClient->testIamPermissions($resource, $permissions); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $locationId = 'locationId552319461'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Location(); - $expectedResponse->setName($name2); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - $response = $gapicClient->getLocation(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - try { - $gapicClient->getLocation(); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; - $expectedResponse = new ListLocationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLocations($locations); - $transport->addResponse($expectedResponse); - $response = $gapicClient->listLocations(); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - try { - $gapicClient->listLocations(); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Dataplex/v1/tests/Unit/V1/MetadataServiceClientTest.php b/owl-bot-staging/Dataplex/v1/tests/Unit/V1/MetadataServiceClientTest.php deleted file mode 100644 index 754b7fe3829f..000000000000 --- a/owl-bot-staging/Dataplex/v1/tests/Unit/V1/MetadataServiceClientTest.php +++ /dev/null @@ -1,1092 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return MetadataServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new MetadataServiceClient($options); - } - - /** @test */ - public function createEntityTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $id = 'id3355'; - $etag = 'etag3123477'; - $asset = 'asset93121264'; - $dataPath = 'dataPath-363501670'; - $dataPathPattern = 'dataPathPattern-594427925'; - $catalogEntry = 'catalogEntry-1234004788'; - $uid = 'uid115792'; - $expectedResponse = new Entity(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setId($id); - $expectedResponse->setEtag($etag); - $expectedResponse->setAsset($asset); - $expectedResponse->setDataPath($dataPath); - $expectedResponse->setDataPathPattern($dataPathPattern); - $expectedResponse->setCatalogEntry($catalogEntry); - $expectedResponse->setUid($uid); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); - $entity = new Entity(); - $entityId = 'entityId-2102099874'; - $entity->setId($entityId); - $entityType = Type::TYPE_UNSPECIFIED; - $entity->setType($entityType); - $entityAsset = 'entityAsset1253969101'; - $entity->setAsset($entityAsset); - $entityDataPath = 'entityDataPath1530173426'; - $entity->setDataPath($entityDataPath); - $entitySystem = StorageSystem::STORAGE_SYSTEM_UNSPECIFIED; - $entity->setSystem($entitySystem); - $entityFormat = new StorageFormat(); - $formatMimeType = 'formatMimeType-1419746651'; - $entityFormat->setMimeType($formatMimeType); - $entity->setFormat($entityFormat); - $entitySchema = new Schema(); - $schemaUserManaged = false; - $entitySchema->setUserManaged($schemaUserManaged); - $entity->setSchema($entitySchema); - $response = $gapicClient->createEntity($formattedParent, $entity); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.MetadataService/CreateEntity', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getEntity(); - $this->assertProtobufEquals($entity, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createEntityExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); - $entity = new Entity(); - $entityId = 'entityId-2102099874'; - $entity->setId($entityId); - $entityType = Type::TYPE_UNSPECIFIED; - $entity->setType($entityType); - $entityAsset = 'entityAsset1253969101'; - $entity->setAsset($entityAsset); - $entityDataPath = 'entityDataPath1530173426'; - $entity->setDataPath($entityDataPath); - $entitySystem = StorageSystem::STORAGE_SYSTEM_UNSPECIFIED; - $entity->setSystem($entitySystem); - $entityFormat = new StorageFormat(); - $formatMimeType = 'formatMimeType-1419746651'; - $entityFormat->setMimeType($formatMimeType); - $entity->setFormat($entityFormat); - $entitySchema = new Schema(); - $schemaUserManaged = false; - $entitySchema->setUserManaged($schemaUserManaged); - $entity->setSchema($entitySchema); - try { - $gapicClient->createEntity($formattedParent, $entity); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createPartitionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $location = 'location1901043637'; - $etag = 'etag3123477'; - $expectedResponse = new Partition(); - $expectedResponse->setName($name); - $expectedResponse->setLocation($location); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->entityName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ENTITY]'); - $partition = new Partition(); - $partitionValues = []; - $partition->setValues($partitionValues); - $partitionLocation = 'partitionLocation-1757508417'; - $partition->setLocation($partitionLocation); - $response = $gapicClient->createPartition($formattedParent, $partition); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.MetadataService/CreatePartition', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getPartition(); - $this->assertProtobufEquals($partition, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createPartitionExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->entityName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ENTITY]'); - $partition = new Partition(); - $partitionValues = []; - $partition->setValues($partitionValues); - $partitionLocation = 'partitionLocation-1757508417'; - $partition->setLocation($partitionLocation); - try { - $gapicClient->createPartition($formattedParent, $partition); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteEntityTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->entityName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ENTITY]'); - $etag = 'etag3123477'; - $gapicClient->deleteEntity($formattedName, $etag); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.MetadataService/DeleteEntity', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getEtag(); - $this->assertProtobufEquals($etag, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteEntityExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->entityName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ENTITY]'); - $etag = 'etag3123477'; - try { - $gapicClient->deleteEntity($formattedName, $etag); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deletePartitionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->partitionName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ENTITY]', '[PARTITION]'); - $gapicClient->deletePartition($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.MetadataService/DeletePartition', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deletePartitionExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->partitionName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ENTITY]', '[PARTITION]'); - try { - $gapicClient->deletePartition($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getEntityTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $id = 'id3355'; - $etag = 'etag3123477'; - $asset = 'asset93121264'; - $dataPath = 'dataPath-363501670'; - $dataPathPattern = 'dataPathPattern-594427925'; - $catalogEntry = 'catalogEntry-1234004788'; - $uid = 'uid115792'; - $expectedResponse = new Entity(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setId($id); - $expectedResponse->setEtag($etag); - $expectedResponse->setAsset($asset); - $expectedResponse->setDataPath($dataPath); - $expectedResponse->setDataPathPattern($dataPathPattern); - $expectedResponse->setCatalogEntry($catalogEntry); - $expectedResponse->setUid($uid); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->entityName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ENTITY]'); - $response = $gapicClient->getEntity($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.MetadataService/GetEntity', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getEntityExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->entityName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ENTITY]'); - try { - $gapicClient->getEntity($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getPartitionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $location = 'location1901043637'; - $etag = 'etag3123477'; - $expectedResponse = new Partition(); - $expectedResponse->setName($name2); - $expectedResponse->setLocation($location); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->partitionName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ENTITY]', '[PARTITION]'); - $response = $gapicClient->getPartition($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.MetadataService/GetPartition', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getPartitionExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->partitionName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ENTITY]', '[PARTITION]'); - try { - $gapicClient->getPartition($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listEntitiesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $entitiesElement = new Entity(); - $entities = [ - $entitiesElement, - ]; - $expectedResponse = new ListEntitiesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setEntities($entities); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); - $view = EntityView::ENTITY_VIEW_UNSPECIFIED; - $response = $gapicClient->listEntities($formattedParent, $view); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getEntities()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.MetadataService/ListEntities', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getView(); - $this->assertProtobufEquals($view, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listEntitiesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->zoneName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]'); - $view = EntityView::ENTITY_VIEW_UNSPECIFIED; - try { - $gapicClient->listEntities($formattedParent, $view); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listPartitionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $partitionsElement = new Partition(); - $partitions = [ - $partitionsElement, - ]; - $expectedResponse = new ListPartitionsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setPartitions($partitions); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->entityName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ENTITY]'); - $response = $gapicClient->listPartitions($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getPartitions()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.MetadataService/ListPartitions', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listPartitionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->entityName('[PROJECT]', '[LOCATION]', '[LAKE]', '[ZONE]', '[ENTITY]'); - try { - $gapicClient->listPartitions($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateEntityTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $id = 'id3355'; - $etag = 'etag3123477'; - $asset = 'asset93121264'; - $dataPath = 'dataPath-363501670'; - $dataPathPattern = 'dataPathPattern-594427925'; - $catalogEntry = 'catalogEntry-1234004788'; - $uid = 'uid115792'; - $expectedResponse = new Entity(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setId($id); - $expectedResponse->setEtag($etag); - $expectedResponse->setAsset($asset); - $expectedResponse->setDataPath($dataPath); - $expectedResponse->setDataPathPattern($dataPathPattern); - $expectedResponse->setCatalogEntry($catalogEntry); - $expectedResponse->setUid($uid); - $transport->addResponse($expectedResponse); - // Mock request - $entity = new Entity(); - $entityId = 'entityId-2102099874'; - $entity->setId($entityId); - $entityType = Type::TYPE_UNSPECIFIED; - $entity->setType($entityType); - $entityAsset = 'entityAsset1253969101'; - $entity->setAsset($entityAsset); - $entityDataPath = 'entityDataPath1530173426'; - $entity->setDataPath($entityDataPath); - $entitySystem = StorageSystem::STORAGE_SYSTEM_UNSPECIFIED; - $entity->setSystem($entitySystem); - $entityFormat = new StorageFormat(); - $formatMimeType = 'formatMimeType-1419746651'; - $entityFormat->setMimeType($formatMimeType); - $entity->setFormat($entityFormat); - $entitySchema = new Schema(); - $schemaUserManaged = false; - $entitySchema->setUserManaged($schemaUserManaged); - $entity->setSchema($entitySchema); - $response = $gapicClient->updateEntity($entity); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.dataplex.v1.MetadataService/UpdateEntity', $actualFuncCall); - $actualValue = $actualRequestObject->getEntity(); - $this->assertProtobufEquals($entity, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateEntityExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $entity = new Entity(); - $entityId = 'entityId-2102099874'; - $entity->setId($entityId); - $entityType = Type::TYPE_UNSPECIFIED; - $entity->setType($entityType); - $entityAsset = 'entityAsset1253969101'; - $entity->setAsset($entityAsset); - $entityDataPath = 'entityDataPath1530173426'; - $entity->setDataPath($entityDataPath); - $entitySystem = StorageSystem::STORAGE_SYSTEM_UNSPECIFIED; - $entity->setSystem($entitySystem); - $entityFormat = new StorageFormat(); - $formatMimeType = 'formatMimeType-1419746651'; - $entityFormat->setMimeType($formatMimeType); - $entity->setFormat($entityFormat); - $entitySchema = new Schema(); - $schemaUserManaged = false; - $entitySchema->setUserManaged($schemaUserManaged); - $entity->setSchema($entitySchema); - try { - $gapicClient->updateEntity($entity); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $response = $gapicClient->getIamPolicy($resource); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - try { - $gapicClient->getIamPolicy($resource); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $response = $gapicClient->setIamPolicy($resource, $policy); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPolicy(); - $this->assertProtobufEquals($policy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - try { - $gapicClient->setIamPolicy($resource, $policy); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new TestIamPermissionsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $response = $gapicClient->testIamPermissions($resource, $permissions); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPermissions(); - $this->assertProtobufEquals($permissions, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - try { - $gapicClient->testIamPermissions($resource, $permissions); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $locationId = 'locationId552319461'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Location(); - $expectedResponse->setName($name2); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - $response = $gapicClient->getLocation(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - try { - $gapicClient->getLocation(); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; - $expectedResponse = new ListLocationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLocations($locations); - $transport->addResponse($expectedResponse); - $response = $gapicClient->listLocations(); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - try { - $gapicClient->listLocations(); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } -}