Skip to content

Commit c460230

Browse files
1 parent cb2fe93 commit c460230

File tree

3 files changed

+176
-0
lines changed

3 files changed

+176
-0
lines changed

src/AnalyticsHub/AIInference.php

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
<?php
2+
/*
3+
* Copyright 2014 Google Inc.
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
6+
* use this file except in compliance with the License. You may obtain a copy of
7+
* the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14+
* License for the specific language governing permissions and limitations under
15+
* the License.
16+
*/
17+
18+
namespace Google\Service\AnalyticsHub;
19+
20+
class AIInference extends \Google\Model
21+
{
22+
/**
23+
* Required. An endpoint to a Vertex AI model of the form
24+
* `projects/{project}/locations/{location}/endpoints/{endpoint}` or `projects
25+
* /{project}/locations/{location}/publishers/{publisher}/models/{model}`.
26+
* Vertex AI API requests will be sent to this endpoint.
27+
*
28+
* @var string
29+
*/
30+
public $endpoint;
31+
/**
32+
* Optional. The service account to use to make prediction requests against
33+
* endpoints. The resource creator or updater that specifies this field must
34+
* have `iam.serviceAccounts.actAs` permission on the service account. If not
35+
* specified, the Pub/Sub [service
36+
* agent]({$universe.dns_names.final_documentation_domain}/iam/docs/service-
37+
* agents), service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com, is
38+
* used.
39+
*
40+
* @var string
41+
*/
42+
public $serviceAccountEmail;
43+
protected $unstructuredInferenceType = UnstructuredInference::class;
44+
protected $unstructuredInferenceDataType = '';
45+
46+
/**
47+
* Required. An endpoint to a Vertex AI model of the form
48+
* `projects/{project}/locations/{location}/endpoints/{endpoint}` or `projects
49+
* /{project}/locations/{location}/publishers/{publisher}/models/{model}`.
50+
* Vertex AI API requests will be sent to this endpoint.
51+
*
52+
* @param string $endpoint
53+
*/
54+
public function setEndpoint($endpoint)
55+
{
56+
$this->endpoint = $endpoint;
57+
}
58+
/**
59+
* @return string
60+
*/
61+
public function getEndpoint()
62+
{
63+
return $this->endpoint;
64+
}
65+
/**
66+
* Optional. The service account to use to make prediction requests against
67+
* endpoints. The resource creator or updater that specifies this field must
68+
* have `iam.serviceAccounts.actAs` permission on the service account. If not
69+
* specified, the Pub/Sub [service
70+
* agent]({$universe.dns_names.final_documentation_domain}/iam/docs/service-
71+
* agents), service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com, is
72+
* used.
73+
*
74+
* @param string $serviceAccountEmail
75+
*/
76+
public function setServiceAccountEmail($serviceAccountEmail)
77+
{
78+
$this->serviceAccountEmail = $serviceAccountEmail;
79+
}
80+
/**
81+
* @return string
82+
*/
83+
public function getServiceAccountEmail()
84+
{
85+
return $this->serviceAccountEmail;
86+
}
87+
/**
88+
* Optional. Requests and responses can be any arbitrary JSON object.
89+
*
90+
* @param UnstructuredInference $unstructuredInference
91+
*/
92+
public function setUnstructuredInference(UnstructuredInference $unstructuredInference)
93+
{
94+
$this->unstructuredInference = $unstructuredInference;
95+
}
96+
/**
97+
* @return UnstructuredInference
98+
*/
99+
public function getUnstructuredInference()
100+
{
101+
return $this->unstructuredInference;
102+
}
103+
}
104+
105+
// Adding a class alias for backwards compatibility with the previous class name.
106+
class_alias(AIInference::class, 'Google_Service_AnalyticsHub_AIInference');

src/AnalyticsHub/MessageTransform.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919

2020
class MessageTransform extends \Google\Model
2121
{
22+
protected $aiInferenceType = AIInference::class;
23+
protected $aiInferenceDataType = '';
2224
/**
2325
* Optional. If true, the transform is disabled and will not be applied to
2426
* messages. Defaults to `false`.
@@ -37,6 +39,22 @@ class MessageTransform extends \Google\Model
3739
protected $javascriptUdfType = JavaScriptUDF::class;
3840
protected $javascriptUdfDataType = '';
3941

42+
/**
43+
* Optional. AI Inference.
44+
*
45+
* @param AIInference $aiInference
46+
*/
47+
public function setAiInference(AIInference $aiInference)
48+
{
49+
$this->aiInference = $aiInference;
50+
}
51+
/**
52+
* @return AIInference
53+
*/
54+
public function getAiInference()
55+
{
56+
return $this->aiInference;
57+
}
4058
/**
4159
* Optional. If true, the transform is disabled and will not be applied to
4260
* messages. Defaults to `false`.
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
<?php
2+
/*
3+
* Copyright 2014 Google Inc.
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
6+
* use this file except in compliance with the License. You may obtain a copy of
7+
* the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14+
* License for the specific language governing permissions and limitations under
15+
* the License.
16+
*/
17+
18+
namespace Google\Service\AnalyticsHub;
19+
20+
class UnstructuredInference extends \Google\Model
21+
{
22+
/**
23+
* Optional. A parameters object to be included in each inference request. The
24+
* parameters object is combined with the data field of the Pub/Sub message to
25+
* form the inference request.
26+
*
27+
* @var array[]
28+
*/
29+
public $parameters;
30+
31+
/**
32+
* Optional. A parameters object to be included in each inference request. The
33+
* parameters object is combined with the data field of the Pub/Sub message to
34+
* form the inference request.
35+
*
36+
* @param array[] $parameters
37+
*/
38+
public function setParameters($parameters)
39+
{
40+
$this->parameters = $parameters;
41+
}
42+
/**
43+
* @return array[]
44+
*/
45+
public function getParameters()
46+
{
47+
return $this->parameters;
48+
}
49+
}
50+
51+
// Adding a class alias for backwards compatibility with the previous class name.
52+
class_alias(UnstructuredInference::class, 'Google_Service_AnalyticsHub_UnstructuredInference');

0 commit comments

Comments
 (0)