Skip to content

Commit ab10510

Browse files
1 parent 7501890 commit ab10510

14 files changed

Lines changed: 1284 additions & 0 deletions
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
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\DatabaseMigrationService;
19+
20+
class BadRequest extends \Google\Collection
21+
{
22+
protected $collection_key = 'fieldViolations';
23+
protected $fieldViolationsType = FieldViolation::class;
24+
protected $fieldViolationsDataType = 'array';
25+
26+
/**
27+
* Describes all violations in a client request.
28+
*
29+
* @param FieldViolation[] $fieldViolations
30+
*/
31+
public function setFieldViolations($fieldViolations)
32+
{
33+
$this->fieldViolations = $fieldViolations;
34+
}
35+
/**
36+
* @return FieldViolation[]
37+
*/
38+
public function getFieldViolations()
39+
{
40+
return $this->fieldViolations;
41+
}
42+
}
43+
44+
// Adding a class alias for backwards compatibility with the previous class name.
45+
class_alias(BadRequest::class, 'Google_Service_DatabaseMigrationService_BadRequest');
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
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\DatabaseMigrationService;
19+
20+
class DebugInfo extends \Google\Collection
21+
{
22+
protected $collection_key = 'stackEntries';
23+
/**
24+
* Additional debugging information provided by the server.
25+
*
26+
* @var string
27+
*/
28+
public $detail;
29+
/**
30+
* The stack trace entries indicating where the error occurred.
31+
*
32+
* @var string[]
33+
*/
34+
public $stackEntries;
35+
36+
/**
37+
* Additional debugging information provided by the server.
38+
*
39+
* @param string $detail
40+
*/
41+
public function setDetail($detail)
42+
{
43+
$this->detail = $detail;
44+
}
45+
/**
46+
* @return string
47+
*/
48+
public function getDetail()
49+
{
50+
return $this->detail;
51+
}
52+
/**
53+
* The stack trace entries indicating where the error occurred.
54+
*
55+
* @param string[] $stackEntries
56+
*/
57+
public function setStackEntries($stackEntries)
58+
{
59+
$this->stackEntries = $stackEntries;
60+
}
61+
/**
62+
* @return string[]
63+
*/
64+
public function getStackEntries()
65+
{
66+
return $this->stackEntries;
67+
}
68+
}
69+
70+
// Adding a class alias for backwards compatibility with the previous class name.
71+
class_alias(DebugInfo::class, 'Google_Service_DatabaseMigrationService_DebugInfo');
Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
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\DatabaseMigrationService;
19+
20+
class ErrorInfo extends \Google\Model
21+
{
22+
/**
23+
* The logical grouping to which the "reason" belongs. The error domain is
24+
* typically the registered service name of the tool or product that generates
25+
* the error. Example: "pubsub.googleapis.com". If the error is generated by
26+
* some common infrastructure, the error domain must be a globally unique
27+
* value that identifies the infrastructure. For Google API infrastructure,
28+
* the error domain is "googleapis.com".
29+
*
30+
* @var string
31+
*/
32+
public $domain;
33+
/**
34+
* Additional structured details about this error. Keys must match a regular
35+
* expression of `a-z+` but should ideally be lowerCamelCase. Also, they must
36+
* be limited to 64 characters in length. When identifying the current value
37+
* of an exceeded limit, the units should be contained in the key, not the
38+
* value. For example, rather than `{"instanceLimit": "100/request"}`, should
39+
* be returned as, `{"instanceLimitPerRequest": "100"}`, if the client exceeds
40+
* the number of instances that can be created in a single (batch) request.
41+
*
42+
* @var string[]
43+
*/
44+
public $metadata;
45+
/**
46+
* The reason of the error. This is a constant value that identifies the
47+
* proximate cause of the error. Error reasons are unique within a particular
48+
* domain of errors. This should be at most 63 characters and match a regular
49+
* expression of `A-Z+[A-Z0-9]`, which represents UPPER_SNAKE_CASE.
50+
*
51+
* @var string
52+
*/
53+
public $reason;
54+
55+
/**
56+
* The logical grouping to which the "reason" belongs. The error domain is
57+
* typically the registered service name of the tool or product that generates
58+
* the error. Example: "pubsub.googleapis.com". If the error is generated by
59+
* some common infrastructure, the error domain must be a globally unique
60+
* value that identifies the infrastructure. For Google API infrastructure,
61+
* the error domain is "googleapis.com".
62+
*
63+
* @param string $domain
64+
*/
65+
public function setDomain($domain)
66+
{
67+
$this->domain = $domain;
68+
}
69+
/**
70+
* @return string
71+
*/
72+
public function getDomain()
73+
{
74+
return $this->domain;
75+
}
76+
/**
77+
* Additional structured details about this error. Keys must match a regular
78+
* expression of `a-z+` but should ideally be lowerCamelCase. Also, they must
79+
* be limited to 64 characters in length. When identifying the current value
80+
* of an exceeded limit, the units should be contained in the key, not the
81+
* value. For example, rather than `{"instanceLimit": "100/request"}`, should
82+
* be returned as, `{"instanceLimitPerRequest": "100"}`, if the client exceeds
83+
* the number of instances that can be created in a single (batch) request.
84+
*
85+
* @param string[] $metadata
86+
*/
87+
public function setMetadata($metadata)
88+
{
89+
$this->metadata = $metadata;
90+
}
91+
/**
92+
* @return string[]
93+
*/
94+
public function getMetadata()
95+
{
96+
return $this->metadata;
97+
}
98+
/**
99+
* The reason of the error. This is a constant value that identifies the
100+
* proximate cause of the error. Error reasons are unique within a particular
101+
* domain of errors. This should be at most 63 characters and match a regular
102+
* expression of `A-Z+[A-Z0-9]`, which represents UPPER_SNAKE_CASE.
103+
*
104+
* @param string $reason
105+
*/
106+
public function setReason($reason)
107+
{
108+
$this->reason = $reason;
109+
}
110+
/**
111+
* @return string
112+
*/
113+
public function getReason()
114+
{
115+
return $this->reason;
116+
}
117+
}
118+
119+
// Adding a class alias for backwards compatibility with the previous class name.
120+
class_alias(ErrorInfo::class, 'Google_Service_DatabaseMigrationService_ErrorInfo');
Lines changed: 147 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,147 @@
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\DatabaseMigrationService;
19+
20+
class FieldViolation extends \Google\Model
21+
{
22+
/**
23+
* A description of why the request element is bad.
24+
*
25+
* @var string
26+
*/
27+
public $description;
28+
/**
29+
* A path that leads to a field in the request body. The value will be a
30+
* sequence of dot-separated identifiers that identify a protocol buffer
31+
* field. Consider the following: message CreateContactRequest { message
32+
* EmailAddress { enum Type { TYPE_UNSPECIFIED = 0; HOME = 1; WORK = 2; }
33+
* optional string email = 1; repeated EmailType type = 2; } string full_name
34+
* = 1; repeated EmailAddress email_addresses = 2; } In this example, in proto
35+
* `field` could take one of the following values: * `full_name` for a
36+
* violation in the `full_name` value * `email_addresses[1].email` for a
37+
* violation in the `email` field of the first `email_addresses` message *
38+
* `email_addresses[3].type[2]` for a violation in the second `type` value in
39+
* the third `email_addresses` message. In JSON, the same values are
40+
* represented as: * `fullName` for a violation in the `fullName` value *
41+
* `emailAddresses[1].email` for a violation in the `email` field of the first
42+
* `emailAddresses` message * `emailAddresses[3].type[2]` for a violation in
43+
* the second `type` value in the third `emailAddresses` message.
44+
*
45+
* @var string
46+
*/
47+
public $field;
48+
protected $localizedMessageType = LocalizedMessage::class;
49+
protected $localizedMessageDataType = '';
50+
/**
51+
* The reason of the field-level error. This is a constant value that
52+
* identifies the proximate cause of the field-level error. It should uniquely
53+
* identify the type of the FieldViolation within the scope of the
54+
* google.rpc.ErrorInfo.domain. This should be at most 63 characters and match
55+
* a regular expression of `A-Z+[A-Z0-9]`, which represents UPPER_SNAKE_CASE.
56+
*
57+
* @var string
58+
*/
59+
public $reason;
60+
61+
/**
62+
* A description of why the request element is bad.
63+
*
64+
* @param string $description
65+
*/
66+
public function setDescription($description)
67+
{
68+
$this->description = $description;
69+
}
70+
/**
71+
* @return string
72+
*/
73+
public function getDescription()
74+
{
75+
return $this->description;
76+
}
77+
/**
78+
* A path that leads to a field in the request body. The value will be a
79+
* sequence of dot-separated identifiers that identify a protocol buffer
80+
* field. Consider the following: message CreateContactRequest { message
81+
* EmailAddress { enum Type { TYPE_UNSPECIFIED = 0; HOME = 1; WORK = 2; }
82+
* optional string email = 1; repeated EmailType type = 2; } string full_name
83+
* = 1; repeated EmailAddress email_addresses = 2; } In this example, in proto
84+
* `field` could take one of the following values: * `full_name` for a
85+
* violation in the `full_name` value * `email_addresses[1].email` for a
86+
* violation in the `email` field of the first `email_addresses` message *
87+
* `email_addresses[3].type[2]` for a violation in the second `type` value in
88+
* the third `email_addresses` message. In JSON, the same values are
89+
* represented as: * `fullName` for a violation in the `fullName` value *
90+
* `emailAddresses[1].email` for a violation in the `email` field of the first
91+
* `emailAddresses` message * `emailAddresses[3].type[2]` for a violation in
92+
* the second `type` value in the third `emailAddresses` message.
93+
*
94+
* @param string $field
95+
*/
96+
public function setField($field)
97+
{
98+
$this->field = $field;
99+
}
100+
/**
101+
* @return string
102+
*/
103+
public function getField()
104+
{
105+
return $this->field;
106+
}
107+
/**
108+
* Provides a localized error message for field-level errors that is safe to
109+
* return to the API consumer.
110+
*
111+
* @param LocalizedMessage $localizedMessage
112+
*/
113+
public function setLocalizedMessage(LocalizedMessage $localizedMessage)
114+
{
115+
$this->localizedMessage = $localizedMessage;
116+
}
117+
/**
118+
* @return LocalizedMessage
119+
*/
120+
public function getLocalizedMessage()
121+
{
122+
return $this->localizedMessage;
123+
}
124+
/**
125+
* The reason of the field-level error. This is a constant value that
126+
* identifies the proximate cause of the field-level error. It should uniquely
127+
* identify the type of the FieldViolation within the scope of the
128+
* google.rpc.ErrorInfo.domain. This should be at most 63 characters and match
129+
* a regular expression of `A-Z+[A-Z0-9]`, which represents UPPER_SNAKE_CASE.
130+
*
131+
* @param string $reason
132+
*/
133+
public function setReason($reason)
134+
{
135+
$this->reason = $reason;
136+
}
137+
/**
138+
* @return string
139+
*/
140+
public function getReason()
141+
{
142+
return $this->reason;
143+
}
144+
}
145+
146+
// Adding a class alias for backwards compatibility with the previous class name.
147+
class_alias(FieldViolation::class, 'Google_Service_DatabaseMigrationService_FieldViolation');

0 commit comments

Comments
 (0)