Skip to content

Commit 92713ab

Browse files
feat: [google-cloud-channel] A new enum CustomerAttestationState is added (#14007)
- [ ] Regenerate this pull request now. BEGIN_COMMIT_OVERRIDE feat: A new enum `CustomerAttestationState` is added feat: A new field `customer_attestation_state` is added to message `.google.cloud.channel.v1.Customer` END_COMMIT_OVERRIDE PiperOrigin-RevId: 771158415 Source-Link: googleapis/googleapis@c618909 Source-Link: googleapis/googleapis-gen@257d944 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWNoYW5uZWwvLk93bEJvdC55YW1sIiwiaCI6IjI1N2Q5NDRhNTk2NDkzZDQ4NmJlZmE1YTVmMmZmYmE1NGE3YzIxNWIifQ== --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 223c62b commit 92713ab

File tree

5 files changed

+79
-3
lines changed

5 files changed

+79
-3
lines changed

packages/google-cloud-channel/google/cloud/channel/gapic_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "1.22.2" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

packages/google-cloud-channel/google/cloud/channel_v1/gapic_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "1.22.2" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

packages/google-cloud-channel/google/cloud/channel_v1/types/customers.py

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,35 @@ class Customer(proto.Message):
8888
Optional. External CRM ID for the customer.
8989
Populated only if a CRM ID exists for this
9090
customer.
91+
customer_attestation_state (google.cloud.channel_v1.types.Customer.CustomerAttestationState):
92+
Optional. Indicate whether a customer is
93+
attesting about the correctness of provided
94+
information. Only required if creating a GCP
95+
Entitlement.
9196
"""
9297

98+
class CustomerAttestationState(proto.Enum):
99+
r"""The enum represents whether a customer belongs to public
100+
sector
101+
102+
Values:
103+
CUSTOMER_ATTESTATION_STATE_UNSPECIFIED (0):
104+
Default value if not set yet
105+
EXEMPT (1):
106+
Customer is exempt from attesting based on
107+
exemption list at
108+
https://cloud.google.com/terms/direct-tos-exemptions.
109+
Contact information of customer will be
110+
mandatory.
111+
NON_EXEMPT_AND_INFO_VERIFIED (2):
112+
Customer is not exempt and has verified the
113+
information provided is correct. Contact
114+
information of customer will be mandatory.
115+
"""
116+
CUSTOMER_ATTESTATION_STATE_UNSPECIFIED = 0
117+
EXEMPT = 1
118+
NON_EXEMPT_AND_INFO_VERIFIED = 2
119+
93120
name: str = proto.Field(
94121
proto.STRING,
95122
number=1,
@@ -147,6 +174,11 @@ class Customer(proto.Message):
147174
proto.STRING,
148175
number=14,
149176
)
177+
customer_attestation_state: CustomerAttestationState = proto.Field(
178+
proto.ENUM,
179+
number=16,
180+
enum=CustomerAttestationState,
181+
)
150182

151183

152184
class ContactInfo(proto.Message):

packages/google-cloud-channel/samples/generated_samples/snippet_metadata_google.cloud.channel.v1.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
],
99
"language": "PYTHON",
1010
"name": "google-cloud-channel",
11-
"version": "1.22.2"
11+
"version": "0.1.0"
1212
},
1313
"snippets": [
1414
{

packages/google-cloud-channel/tests/unit/gapic/channel_v1/test_cloud_channel_service.py

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1622,6 +1622,7 @@ def test_get_customer(request_type, transport: str = "grpc"):
16221622
language_code="language_code_value",
16231623
channel_partner_id="channel_partner_id_value",
16241624
correlation_id="correlation_id_value",
1625+
customer_attestation_state=customers.Customer.CustomerAttestationState.EXEMPT,
16251626
)
16261627
response = client.get_customer(request)
16271628

@@ -1641,6 +1642,10 @@ def test_get_customer(request_type, transport: str = "grpc"):
16411642
assert response.language_code == "language_code_value"
16421643
assert response.channel_partner_id == "channel_partner_id_value"
16431644
assert response.correlation_id == "correlation_id_value"
1645+
assert (
1646+
response.customer_attestation_state
1647+
== customers.Customer.CustomerAttestationState.EXEMPT
1648+
)
16441649

16451650

16461651
def test_get_customer_non_empty_request_with_auto_populated_field():
@@ -1774,6 +1779,7 @@ async def test_get_customer_async(
17741779
language_code="language_code_value",
17751780
channel_partner_id="channel_partner_id_value",
17761781
correlation_id="correlation_id_value",
1782+
customer_attestation_state=customers.Customer.CustomerAttestationState.EXEMPT,
17771783
)
17781784
)
17791785
response = await client.get_customer(request)
@@ -1794,6 +1800,10 @@ async def test_get_customer_async(
17941800
assert response.language_code == "language_code_value"
17951801
assert response.channel_partner_id == "channel_partner_id_value"
17961802
assert response.correlation_id == "correlation_id_value"
1803+
assert (
1804+
response.customer_attestation_state
1805+
== customers.Customer.CustomerAttestationState.EXEMPT
1806+
)
17971807

17981808

17991809
@pytest.mark.asyncio
@@ -2224,6 +2234,7 @@ def test_create_customer(request_type, transport: str = "grpc"):
22242234
language_code="language_code_value",
22252235
channel_partner_id="channel_partner_id_value",
22262236
correlation_id="correlation_id_value",
2237+
customer_attestation_state=customers.Customer.CustomerAttestationState.EXEMPT,
22272238
)
22282239
response = client.create_customer(request)
22292240

@@ -2243,6 +2254,10 @@ def test_create_customer(request_type, transport: str = "grpc"):
22432254
assert response.language_code == "language_code_value"
22442255
assert response.channel_partner_id == "channel_partner_id_value"
22452256
assert response.correlation_id == "correlation_id_value"
2257+
assert (
2258+
response.customer_attestation_state
2259+
== customers.Customer.CustomerAttestationState.EXEMPT
2260+
)
22462261

22472262

22482263
def test_create_customer_non_empty_request_with_auto_populated_field():
@@ -2376,6 +2391,7 @@ async def test_create_customer_async(
23762391
language_code="language_code_value",
23772392
channel_partner_id="channel_partner_id_value",
23782393
correlation_id="correlation_id_value",
2394+
customer_attestation_state=customers.Customer.CustomerAttestationState.EXEMPT,
23792395
)
23802396
)
23812397
response = await client.create_customer(request)
@@ -2396,6 +2412,10 @@ async def test_create_customer_async(
23962412
assert response.language_code == "language_code_value"
23972413
assert response.channel_partner_id == "channel_partner_id_value"
23982414
assert response.correlation_id == "correlation_id_value"
2415+
assert (
2416+
response.customer_attestation_state
2417+
== customers.Customer.CustomerAttestationState.EXEMPT
2418+
)
23992419

24002420

24012421
@pytest.mark.asyncio
@@ -2491,6 +2511,7 @@ def test_update_customer(request_type, transport: str = "grpc"):
24912511
language_code="language_code_value",
24922512
channel_partner_id="channel_partner_id_value",
24932513
correlation_id="correlation_id_value",
2514+
customer_attestation_state=customers.Customer.CustomerAttestationState.EXEMPT,
24942515
)
24952516
response = client.update_customer(request)
24962517

@@ -2510,6 +2531,10 @@ def test_update_customer(request_type, transport: str = "grpc"):
25102531
assert response.language_code == "language_code_value"
25112532
assert response.channel_partner_id == "channel_partner_id_value"
25122533
assert response.correlation_id == "correlation_id_value"
2534+
assert (
2535+
response.customer_attestation_state
2536+
== customers.Customer.CustomerAttestationState.EXEMPT
2537+
)
25132538

25142539

25152540
def test_update_customer_non_empty_request_with_auto_populated_field():
@@ -2639,6 +2664,7 @@ async def test_update_customer_async(
26392664
language_code="language_code_value",
26402665
channel_partner_id="channel_partner_id_value",
26412666
correlation_id="correlation_id_value",
2667+
customer_attestation_state=customers.Customer.CustomerAttestationState.EXEMPT,
26422668
)
26432669
)
26442670
response = await client.update_customer(request)
@@ -2659,6 +2685,10 @@ async def test_update_customer_async(
26592685
assert response.language_code == "language_code_value"
26602686
assert response.channel_partner_id == "channel_partner_id_value"
26612687
assert response.correlation_id == "correlation_id_value"
2688+
assert (
2689+
response.customer_attestation_state
2690+
== customers.Customer.CustomerAttestationState.EXEMPT
2691+
)
26622692

26632693

26642694
@pytest.mark.asyncio
@@ -3065,6 +3095,7 @@ def test_import_customer(request_type, transport: str = "grpc"):
30653095
language_code="language_code_value",
30663096
channel_partner_id="channel_partner_id_value",
30673097
correlation_id="correlation_id_value",
3098+
customer_attestation_state=customers.Customer.CustomerAttestationState.EXEMPT,
30683099
)
30693100
response = client.import_customer(request)
30703101

@@ -3084,6 +3115,10 @@ def test_import_customer(request_type, transport: str = "grpc"):
30843115
assert response.language_code == "language_code_value"
30853116
assert response.channel_partner_id == "channel_partner_id_value"
30863117
assert response.correlation_id == "correlation_id_value"
3118+
assert (
3119+
response.customer_attestation_state
3120+
== customers.Customer.CustomerAttestationState.EXEMPT
3121+
)
30873122

30883123

30893124
def test_import_customer_non_empty_request_with_auto_populated_field():
@@ -3229,6 +3264,7 @@ async def test_import_customer_async(
32293264
language_code="language_code_value",
32303265
channel_partner_id="channel_partner_id_value",
32313266
correlation_id="correlation_id_value",
3267+
customer_attestation_state=customers.Customer.CustomerAttestationState.EXEMPT,
32323268
)
32333269
)
32343270
response = await client.import_customer(request)
@@ -3249,6 +3285,10 @@ async def test_import_customer_async(
32493285
assert response.language_code == "language_code_value"
32503286
assert response.channel_partner_id == "channel_partner_id_value"
32513287
assert response.correlation_id == "correlation_id_value"
3288+
assert (
3289+
response.customer_attestation_state
3290+
== customers.Customer.CustomerAttestationState.EXEMPT
3291+
)
32523292

32533293

32543294
@pytest.mark.asyncio
@@ -19531,6 +19571,7 @@ async def test_get_customer_empty_call_grpc_asyncio():
1953119571
language_code="language_code_value",
1953219572
channel_partner_id="channel_partner_id_value",
1953319573
correlation_id="correlation_id_value",
19574+
customer_attestation_state=customers.Customer.CustomerAttestationState.EXEMPT,
1953419575
)
1953519576
)
1953619577
await client.get_customer(request=None)
@@ -19592,6 +19633,7 @@ async def test_create_customer_empty_call_grpc_asyncio():
1959219633
language_code="language_code_value",
1959319634
channel_partner_id="channel_partner_id_value",
1959419635
correlation_id="correlation_id_value",
19636+
customer_attestation_state=customers.Customer.CustomerAttestationState.EXEMPT,
1959519637
)
1959619638
)
1959719639
await client.create_customer(request=None)
@@ -19626,6 +19668,7 @@ async def test_update_customer_empty_call_grpc_asyncio():
1962619668
language_code="language_code_value",
1962719669
channel_partner_id="channel_partner_id_value",
1962819670
correlation_id="correlation_id_value",
19671+
customer_attestation_state=customers.Customer.CustomerAttestationState.EXEMPT,
1962919672
)
1963019673
)
1963119674
await client.update_customer(request=None)
@@ -19683,6 +19726,7 @@ async def test_import_customer_empty_call_grpc_asyncio():
1968319726
language_code="language_code_value",
1968419727
channel_partner_id="channel_partner_id_value",
1968519728
correlation_id="correlation_id_value",
19729+
customer_attestation_state=customers.Customer.CustomerAttestationState.EXEMPT,
1968619730
)
1968719731
)
1968819732
await client.import_customer(request=None)

0 commit comments

Comments
 (0)