diff --git a/VERSION b/VERSION index 1e9c35f..d1dd3f9 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -10.5.3 +10.6.0 diff --git a/src/Clarifai/Api/ComputeCluster.php b/src/Clarifai/Api/ComputeCluster.php index 47818ec..f564808 100644 --- a/src/Clarifai/Api/ComputeCluster.php +++ b/src/Clarifai/Api/ComputeCluster.php @@ -58,6 +58,14 @@ class ComputeCluster extends \Google\Protobuf\Internal\Message * Generated from protobuf field .google.protobuf.Timestamp modified_at = 7; */ protected $modified_at = null; + /** + * The visibility field represents whether this message is privately/publicly visible. + * To be visible to the public the App that contains it AND the User that contains the App must + * also be publicly visible. + * + * Generated from protobuf field .clarifai.api.Visibility visibility = 8; + */ + protected $visibility = null; /** * Constructor. @@ -78,6 +86,10 @@ class ComputeCluster extends \Google\Protobuf\Internal\Message * When the compute cluster was created. * @type \Google\Protobuf\Timestamp $modified_at * When the compute cluster was last modified. + * @type \Clarifai\Api\Visibility $visibility + * The visibility field represents whether this message is privately/publicly visible. + * To be visible to the public the App that contains it AND the User that contains the App must + * also be publicly visible. * } */ public function __construct($data = NULL) { @@ -291,5 +303,45 @@ public function setModifiedAt($var) return $this; } + /** + * The visibility field represents whether this message is privately/publicly visible. + * To be visible to the public the App that contains it AND the User that contains the App must + * also be publicly visible. + * + * Generated from protobuf field .clarifai.api.Visibility visibility = 8; + * @return \Clarifai\Api\Visibility|null + */ + public function getVisibility() + { + return $this->visibility; + } + + public function hasVisibility() + { + return isset($this->visibility); + } + + public function clearVisibility() + { + unset($this->visibility); + } + + /** + * The visibility field represents whether this message is privately/publicly visible. + * To be visible to the public the App that contains it AND the User that contains the App must + * also be publicly visible. + * + * Generated from protobuf field .clarifai.api.Visibility visibility = 8; + * @param \Clarifai\Api\Visibility $var + * @return $this + */ + public function setVisibility($var) + { + GPBUtil::checkMessage($var, \Clarifai\Api\Visibility::class); + $this->visibility = $var; + + return $this; + } + } diff --git a/src/Clarifai/Api/DeleteRunnersRequest.php b/src/Clarifai/Api/DeleteRunnersRequest.php index a36929f..a8d99c8 100644 --- a/src/Clarifai/Api/DeleteRunnersRequest.php +++ b/src/Clarifai/Api/DeleteRunnersRequest.php @@ -27,6 +27,10 @@ class DeleteRunnersRequest extends \Google\Protobuf\Internal\Message * Generated from protobuf field repeated string ids = 3; */ private $ids; + /** + * Generated from protobuf field string compute_cluster_id = 4; + */ + protected $compute_cluster_id = ''; /** * Constructor. @@ -37,6 +41,7 @@ class DeleteRunnersRequest extends \Google\Protobuf\Internal\Message * @type \Clarifai\Api\UserAppIDSet $user_app_id * @type string $nodepool_id * @type array|\Google\Protobuf\Internal\RepeatedField $ids + * @type string $compute_cluster_id * } */ public function __construct($data = NULL) { @@ -120,5 +125,27 @@ public function setIds($var) return $this; } + /** + * Generated from protobuf field string compute_cluster_id = 4; + * @return string + */ + public function getComputeClusterId() + { + return $this->compute_cluster_id; + } + + /** + * Generated from protobuf field string compute_cluster_id = 4; + * @param string $var + * @return $this + */ + public function setComputeClusterId($var) + { + GPBUtil::checkString($var, True); + $this->compute_cluster_id = $var; + + return $this; + } + } diff --git a/src/Clarifai/Api/GetRunnerRequest.php b/src/Clarifai/Api/GetRunnerRequest.php index 698a7df..f733706 100644 --- a/src/Clarifai/Api/GetRunnerRequest.php +++ b/src/Clarifai/Api/GetRunnerRequest.php @@ -27,6 +27,10 @@ class GetRunnerRequest extends \Google\Protobuf\Internal\Message * Generated from protobuf field string runner_id = 3; */ protected $runner_id = ''; + /** + * Generated from protobuf field string compute_cluster_id = 4; + */ + protected $compute_cluster_id = ''; /** * Constructor. @@ -37,6 +41,7 @@ class GetRunnerRequest extends \Google\Protobuf\Internal\Message * @type \Clarifai\Api\UserAppIDSet $user_app_id * @type string $nodepool_id * @type string $runner_id + * @type string $compute_cluster_id * } */ public function __construct($data = NULL) { @@ -120,5 +125,27 @@ public function setRunnerId($var) return $this; } + /** + * Generated from protobuf field string compute_cluster_id = 4; + * @return string + */ + public function getComputeClusterId() + { + return $this->compute_cluster_id; + } + + /** + * Generated from protobuf field string compute_cluster_id = 4; + * @param string $var + * @return $this + */ + public function setComputeClusterId($var) + { + GPBUtil::checkString($var, True); + $this->compute_cluster_id = $var; + + return $this; + } + } diff --git a/src/Clarifai/Api/ListRunnerItemsRequest.php b/src/Clarifai/Api/ListRunnerItemsRequest.php index 9ce4d58..2d6583a 100644 --- a/src/Clarifai/Api/ListRunnerItemsRequest.php +++ b/src/Clarifai/Api/ListRunnerItemsRequest.php @@ -25,6 +25,10 @@ class ListRunnerItemsRequest extends \Google\Protobuf\Internal\Message * Generated from protobuf field string runner_id = 3; */ protected $runner_id = ''; + /** + * Generated from protobuf field string compute_cluster_id = 4; + */ + protected $compute_cluster_id = ''; /** * Constructor. @@ -35,6 +39,7 @@ class ListRunnerItemsRequest extends \Google\Protobuf\Internal\Message * @type \Clarifai\Api\UserAppIDSet $user_app_id * @type string $nodepool_id * @type string $runner_id + * @type string $compute_cluster_id * } */ public function __construct($data = NULL) { @@ -118,5 +123,27 @@ public function setRunnerId($var) return $this; } + /** + * Generated from protobuf field string compute_cluster_id = 4; + * @return string + */ + public function getComputeClusterId() + { + return $this->compute_cluster_id; + } + + /** + * Generated from protobuf field string compute_cluster_id = 4; + * @param string $var + * @return $this + */ + public function setComputeClusterId($var) + { + GPBUtil::checkString($var, True); + $this->compute_cluster_id = $var; + + return $this; + } + } diff --git a/src/Clarifai/Api/ListRunnersRequest.php b/src/Clarifai/Api/ListRunnersRequest.php index 69bf952..2d840b4 100644 --- a/src/Clarifai/Api/ListRunnersRequest.php +++ b/src/Clarifai/Api/ListRunnersRequest.php @@ -37,6 +37,10 @@ class ListRunnersRequest extends \Google\Protobuf\Internal\Message * Generated from protobuf field uint32 per_page = 4; */ protected $per_page = 0; + /** + * Generated from protobuf field string compute_cluster_id = 5; + */ + protected $compute_cluster_id = ''; /** * Constructor. @@ -52,6 +56,7 @@ class ListRunnersRequest extends \Google\Protobuf\Internal\Message * @type int $per_page * (optional URL parameter) The number of results that will be contained in each page. Defaults * to 128. + * @type string $compute_cluster_id * } */ public function __construct($data = NULL) { @@ -169,5 +174,27 @@ public function setPerPage($var) return $this; } + /** + * Generated from protobuf field string compute_cluster_id = 5; + * @return string + */ + public function getComputeClusterId() + { + return $this->compute_cluster_id; + } + + /** + * Generated from protobuf field string compute_cluster_id = 5; + * @param string $var + * @return $this + */ + public function setComputeClusterId($var) + { + GPBUtil::checkString($var, True); + $this->compute_cluster_id = $var; + + return $this; + } + } diff --git a/src/Clarifai/Api/Nodepool.php b/src/Clarifai/Api/Nodepool.php index d89944d..9a13364 100644 --- a/src/Clarifai/Api/Nodepool.php +++ b/src/Clarifai/Api/Nodepool.php @@ -41,12 +41,6 @@ class Nodepool extends \Google\Protobuf\Internal\Message * Generated from protobuf field .google.protobuf.Timestamp modified_at = 4; */ protected $modified_at = null; - /** - * The user/org that this nodepool belongs to. - * - * Generated from protobuf field string user_id = 5; - */ - protected $user_id = ''; /** * Which cluster this nodepool is within. * @@ -105,8 +99,6 @@ class Nodepool extends \Google\Protobuf\Internal\Message * When the nodepool was created. * @type \Google\Protobuf\Timestamp $modified_at * When the nodepool was last modified. - * @type string $user_id - * The user/org that this nodepool belongs to. * @type \Clarifai\Api\ComputeCluster $compute_cluster * Which cluster this nodepool is within. * @type \Clarifai\Api\NodeCapacityType $node_capacity_type @@ -255,32 +247,6 @@ public function setModifiedAt($var) return $this; } - /** - * The user/org that this nodepool belongs to. - * - * Generated from protobuf field string user_id = 5; - * @return string - */ - public function getUserId() - { - return $this->user_id; - } - - /** - * The user/org that this nodepool belongs to. - * - * Generated from protobuf field string user_id = 5; - * @param string $var - * @return $this - */ - public function setUserId($var) - { - GPBUtil::checkString($var, True); - $this->user_id = $var; - - return $this; - } - /** * Which cluster this nodepool is within. * diff --git a/src/Clarifai/Api/PatchAppsDetailsRequest.php b/src/Clarifai/Api/PatchAppsDetailsRequest.php new file mode 100644 index 0000000..1cee75f --- /dev/null +++ b/src/Clarifai/Api/PatchAppsDetailsRequest.php @@ -0,0 +1,141 @@ +clarifai.api.PatchAppsDetailsRequest + */ +class PatchAppsDetailsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .clarifai.api.UserAppIDSet user_app_id = 1; + */ + protected $user_app_id = null; + /** + * Generated from protobuf field repeated .clarifai.api.App apps = 2; + */ + private $apps; + /** + * The action to perform on the patched App objects + * Supported values: 'overwrite' and 'remove'. + * Note that 'remove' can only be used to remove the app image by setting + * 'image.url' in the request to the current value returned for that app. + * + * Generated from protobuf field string action = 3; + */ + protected $action = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Clarifai\Api\UserAppIDSet $user_app_id + * @type array<\Clarifai\Api\App>|\Google\Protobuf\Internal\RepeatedField $apps + * @type string $action + * The action to perform on the patched App objects + * Supported values: 'overwrite' and 'remove'. + * Note that 'remove' can only be used to remove the app image by setting + * 'image.url' in the request to the current value returned for that app. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Proto\Clarifai\Api\Service::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .clarifai.api.UserAppIDSet user_app_id = 1; + * @return \Clarifai\Api\UserAppIDSet|null + */ + public function getUserAppId() + { + return $this->user_app_id; + } + + public function hasUserAppId() + { + return isset($this->user_app_id); + } + + public function clearUserAppId() + { + unset($this->user_app_id); + } + + /** + * Generated from protobuf field .clarifai.api.UserAppIDSet user_app_id = 1; + * @param \Clarifai\Api\UserAppIDSet $var + * @return $this + */ + public function setUserAppId($var) + { + GPBUtil::checkMessage($var, \Clarifai\Api\UserAppIDSet::class); + $this->user_app_id = $var; + + return $this; + } + + /** + * Generated from protobuf field repeated .clarifai.api.App apps = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getApps() + { + return $this->apps; + } + + /** + * Generated from protobuf field repeated .clarifai.api.App apps = 2; + * @param array<\Clarifai\Api\App>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setApps($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Clarifai\Api\App::class); + $this->apps = $arr; + + return $this; + } + + /** + * The action to perform on the patched App objects + * Supported values: 'overwrite' and 'remove'. + * Note that 'remove' can only be used to remove the app image by setting + * 'image.url' in the request to the current value returned for that app. + * + * Generated from protobuf field string action = 3; + * @return string + */ + public function getAction() + { + return $this->action; + } + + /** + * The action to perform on the patched App objects + * Supported values: 'overwrite' and 'remove'. + * Note that 'remove' can only be used to remove the app image by setting + * 'image.url' in the request to the current value returned for that app. + * + * Generated from protobuf field string action = 3; + * @param string $var + * @return $this + */ + public function setAction($var) + { + GPBUtil::checkString($var, True); + $this->action = $var; + + return $this; + } + +} + diff --git a/src/Clarifai/Api/PostRunnerItemOutputsRequest.php b/src/Clarifai/Api/PostRunnerItemOutputsRequest.php index 165eb1d..6d90363 100644 --- a/src/Clarifai/Api/PostRunnerItemOutputsRequest.php +++ b/src/Clarifai/Api/PostRunnerItemOutputsRequest.php @@ -64,6 +64,10 @@ class PostRunnerItemOutputsRequest extends \Google\Protobuf\Internal\Message * Generated from protobuf field string runner_replica_id = 7; */ protected $runner_replica_id = ''; + /** + * Generated from protobuf field string compute_cluster_id = 8; + */ + protected $compute_cluster_id = ''; /** * Constructor. @@ -88,6 +92,7 @@ class PostRunnerItemOutputsRequest extends \Google\Protobuf\Internal\Message * @type string $runner_replica_id * A unique ID to represent the runner. This may be tied to an underlying compute instance * information or just an UUID. + * @type string $compute_cluster_id * } */ public function __construct($data = NULL) { @@ -301,5 +306,27 @@ public function setRunnerReplicaId($var) return $this; } + /** + * Generated from protobuf field string compute_cluster_id = 8; + * @return string + */ + public function getComputeClusterId() + { + return $this->compute_cluster_id; + } + + /** + * Generated from protobuf field string compute_cluster_id = 8; + * @param string $var + * @return $this + */ + public function setComputeClusterId($var) + { + GPBUtil::checkString($var, True); + $this->compute_cluster_id = $var; + + return $this; + } + } diff --git a/src/Clarifai/Api/PostRunnersRequest.php b/src/Clarifai/Api/PostRunnersRequest.php index 40d2874..21d9352 100644 --- a/src/Clarifai/Api/PostRunnersRequest.php +++ b/src/Clarifai/Api/PostRunnersRequest.php @@ -29,6 +29,10 @@ class PostRunnersRequest extends \Google\Protobuf\Internal\Message * Generated from protobuf field repeated .clarifai.api.Runner runners = 3; */ private $runners; + /** + * Generated from protobuf field string compute_cluster_id = 4; + */ + protected $compute_cluster_id = ''; /** * Constructor. @@ -40,6 +44,7 @@ class PostRunnersRequest extends \Google\Protobuf\Internal\Message * @type string $nodepool_id * @type array<\Clarifai\Api\Runner>|\Google\Protobuf\Internal\RepeatedField $runners * This allows you to create one or more runner by posting it to the API. + * @type string $compute_cluster_id * } */ public function __construct($data = NULL) { @@ -127,5 +132,27 @@ public function setRunners($var) return $this; } + /** + * Generated from protobuf field string compute_cluster_id = 4; + * @return string + */ + public function getComputeClusterId() + { + return $this->compute_cluster_id; + } + + /** + * Generated from protobuf field string compute_cluster_id = 4; + * @param string $var + * @return $this + */ + public function setComputeClusterId($var) + { + GPBUtil::checkString($var, True); + $this->compute_cluster_id = $var; + + return $this; + } + } diff --git a/src/Clarifai/Api/PutTaskAssignmentsRequest.php b/src/Clarifai/Api/PutTaskAssignmentsRequest.php index 13f2d14..034f4b1 100644 --- a/src/Clarifai/Api/PutTaskAssignmentsRequest.php +++ b/src/Clarifai/Api/PutTaskAssignmentsRequest.php @@ -56,6 +56,8 @@ class PutTaskAssignmentsRequest extends \Google\Protobuf\Internal\Message * @type int $action * Action to perform on selected task. * @type \Clarifai\Api\LabelSubmitConfig $label_submit_config + * LabelStartConfig label_start_config = 5; // no config for label start action + * @type \Clarifai\Api\ReviewStartConfig $review_start_config * @type \Clarifai\Api\ReviewApproveConfig $review_approve_config * @type \Clarifai\Api\ReviewRequestChangesConfig $review_request_changes_config * @type \Clarifai\Api\ReviewRejectConfig $review_reject_config @@ -179,6 +181,8 @@ public function setAction($var) } /** + * LabelStartConfig label_start_config = 5; // no config for label start action + * * Generated from protobuf field .clarifai.api.LabelSubmitConfig label_submit_config = 6; * @return \Clarifai\Api\LabelSubmitConfig|null */ @@ -193,6 +197,8 @@ public function hasLabelSubmitConfig() } /** + * LabelStartConfig label_start_config = 5; // no config for label start action + * * Generated from protobuf field .clarifai.api.LabelSubmitConfig label_submit_config = 6; * @param \Clarifai\Api\LabelSubmitConfig $var * @return $this @@ -205,6 +211,33 @@ public function setLabelSubmitConfig($var) return $this; } + /** + * Generated from protobuf field .clarifai.api.ReviewStartConfig review_start_config = 10; + * @return \Clarifai\Api\ReviewStartConfig|null + */ + public function getReviewStartConfig() + { + return $this->readOneof(10); + } + + public function hasReviewStartConfig() + { + return $this->hasOneof(10); + } + + /** + * Generated from protobuf field .clarifai.api.ReviewStartConfig review_start_config = 10; + * @param \Clarifai\Api\ReviewStartConfig $var + * @return $this + */ + public function setReviewStartConfig($var) + { + GPBUtil::checkMessage($var, \Clarifai\Api\ReviewStartConfig::class); + $this->writeOneof(10, $var); + + return $this; + } + /** * Generated from protobuf field .clarifai.api.ReviewApproveConfig review_approve_config = 7; * @return \Clarifai\Api\ReviewApproveConfig|null diff --git a/src/Clarifai/Api/ReviewStartConfig.php b/src/Clarifai/Api/ReviewStartConfig.php new file mode 100644 index 0000000..a5453eb --- /dev/null +++ b/src/Clarifai/Api/ReviewStartConfig.php @@ -0,0 +1,69 @@ +clarifai.api.ReviewStartConfig + */ +class ReviewStartConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Review the work done by these workers. + * If empty, review the work for all workers. + * + * Generated from protobuf field repeated .clarifai.api.Worker workers = 1; + */ + private $workers; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Clarifai\Api\Worker>|\Google\Protobuf\Internal\RepeatedField $workers + * Review the work done by these workers. + * If empty, review the work for all workers. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Proto\Clarifai\Api\Service::initOnce(); + parent::__construct($data); + } + + /** + * Review the work done by these workers. + * If empty, review the work for all workers. + * + * Generated from protobuf field repeated .clarifai.api.Worker workers = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getWorkers() + { + return $this->workers; + } + + /** + * Review the work done by these workers. + * If empty, review the work for all workers. + * + * Generated from protobuf field repeated .clarifai.api.Worker workers = 1; + * @param array<\Clarifai\Api\Worker>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setWorkers($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Clarifai\Api\Worker::class); + $this->workers = $arr; + + return $this; + } + +} + diff --git a/src/Clarifai/Api/Runner.php b/src/Clarifai/Api/Runner.php index 3e07b54..262b963 100644 --- a/src/Clarifai/Api/Runner.php +++ b/src/Clarifai/Api/Runner.php @@ -49,12 +49,6 @@ class Runner extends \Google\Protobuf\Internal\Message * Generated from protobuf field .google.protobuf.Struct metadata = 5; */ protected $metadata = null; - /** - * The owner of the runner. Runners belong to a user/org account. - * - * Generated from protobuf field string user_id = 6; - */ - protected $user_id = ''; /** * Labels to match in order to find work. * @@ -118,8 +112,6 @@ class Runner extends \Google\Protobuf\Internal\Message * To handle arbitrary json metadata you can use a struct field: * https://github.com/google/protobuf/blob/master/src/google/protobuf/struct.proto * This is an optional arg. - * @type string $user_id - * The owner of the runner. Runners belong to a user/org account. * @type array|\Google\Protobuf\Internal\RepeatedField $labels * Labels to match in order to find work. * @type \Clarifai\Api\Worker $worker @@ -315,32 +307,6 @@ public function setMetadata($var) return $this; } - /** - * The owner of the runner. Runners belong to a user/org account. - * - * Generated from protobuf field string user_id = 6; - * @return string - */ - public function getUserId() - { - return $this->user_id; - } - - /** - * The owner of the runner. Runners belong to a user/org account. - * - * Generated from protobuf field string user_id = 6; - * @param string $var - * @return $this - */ - public function setUserId($var) - { - GPBUtil::checkString($var, True); - $this->user_id = $var; - - return $this; - } - /** * Labels to match in order to find work. * diff --git a/src/Clarifai/Api/V2Client.php b/src/Clarifai/Api/V2Client.php index 14ce97b..0f7d099 100644 --- a/src/Clarifai/Api/V2Client.php +++ b/src/Clarifai/Api/V2Client.php @@ -1993,6 +1993,22 @@ public function PatchApps(\Clarifai\Api\PatchAppsRequest $argument, $metadata, $options); } + /** + * Allows to Patch only the below fields in one or more apps. + * Allowed fields are notes, description and image + * @param \Clarifai\Api\PatchAppsDetailsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function PatchAppsDetails(\Clarifai\Api\PatchAppsDetailsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/clarifai.api.V2/PatchAppsDetails', + $argument, + ['\Clarifai\Api\MultiAppResponse', 'decode'], + $metadata, $options); + } + /** * Patch apps ids. * @param \Clarifai\Api\PatchAppsIdsRequest $argument input argument diff --git a/src/GPBMetadata/Proto/Clarifai/Api/Resources.php b/src/GPBMetadata/Proto/Clarifai/Api/Resources.php index d7c63de..e4f52f4 100644 Binary files a/src/GPBMetadata/Proto/Clarifai/Api/Resources.php and b/src/GPBMetadata/Proto/Clarifai/Api/Resources.php differ diff --git a/src/GPBMetadata/Proto/Clarifai/Api/Service.php b/src/GPBMetadata/Proto/Clarifai/Api/Service.php index fd3df56..4201d87 100644 Binary files a/src/GPBMetadata/Proto/Clarifai/Api/Service.php and b/src/GPBMetadata/Proto/Clarifai/Api/Service.php differ