Skip to content

Commit

Permalink
feat: [maps-addressvalidation] add session token support for Autocomp…
Browse files Browse the repository at this point in the history
…lete (New) sessions that end with a call to Address Validation (#10405)

* feat: add session token support for Autocomplete (New) sessions that end with a call to Address Validation
feat: add new fields to USPS data
docs: update proto field descriptions

PiperOrigin-RevId: 608369029

Source-Link: googleapis/googleapis@5ff3e52

Source-Link: https://github.com/googleapis/googleapis-gen/commit/c1828358be412ba02e45bfbae3afc2b3dadd5d32
Copy-Tag: eyJwIjoiamF2YS1tYXBzLWFkZHJlc3N2YWxpZGF0aW9uLy5Pd2xCb3QueWFtbCIsImgiOiJjMTgyODM1OGJlNDEyYmEwMmU0NWJmYmFlM2FmYzJiM2RhZGQ1ZDMyIn0=

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] authored Feb 20, 2024
1 parent 05acf2d commit 7158e2d
Show file tree
Hide file tree
Showing 18 changed files with 4,672 additions and 1,961 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
* .setAddress(PostalAddress.newBuilder().build())
* .setPreviousResponseId("previousResponseId468754323")
* .setEnableUspsCass(true)
* .setSessionToken("sessionToken-696552189")
* .build();
* ValidateAddressResponse response = addressValidationClient.validateAddress(request);
* }
Expand Down Expand Up @@ -213,6 +214,7 @@ public AddressValidationStub getStub() {
* .setAddress(PostalAddress.newBuilder().build())
* .setPreviousResponseId("previousResponseId468754323")
* .setEnableUspsCass(true)
* .setSessionToken("sessionToken-696552189")
* .build();
* ValidateAddressResponse response = addressValidationClient.validateAddress(request);
* }
Expand Down Expand Up @@ -243,6 +245,7 @@ public final ValidateAddressResponse validateAddress(ValidateAddressRequest requ
* .setAddress(PostalAddress.newBuilder().build())
* .setPreviousResponseId("previousResponseId468754323")
* .setEnableUspsCass(true)
* .setSessionToken("sessionToken-696552189")
* .build();
* ApiFuture<ValidateAddressResponse> future =
* addressValidationClient.validateAddressCallable().futureCall(request);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
* .setAddress(PostalAddress.newBuilder().build())
* .setPreviousResponseId("previousResponseId468754323")
* .setEnableUspsCass(true)
* .setSessionToken("sessionToken-696552189")
* .build();
* ValidateAddressResponse response = addressValidationClient.validateAddress(request);
* }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ public void validateAddressTest() throws Exception {
.setAddress(PostalAddress.newBuilder().build())
.setPreviousResponseId("previousResponseId468754323")
.setEnableUspsCass(true)
.setSessionToken("sessionToken-696552189")
.build();

ValidateAddressResponse actualResponse = client.validateAddress(request);
Expand Down Expand Up @@ -119,6 +120,7 @@ public void validateAddressExceptionTest() throws Exception {
.setAddress(PostalAddress.newBuilder().build())
.setPreviousResponseId("previousResponseId468754323")
.setEnableUspsCass(true)
.setSessionToken("sessionToken-696552189")
.build();
client.validateAddress(request);
Assert.fail("No exception raised");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ public void validateAddressTest() throws Exception {
.setAddress(PostalAddress.newBuilder().build())
.setPreviousResponseId("previousResponseId468754323")
.setEnableUspsCass(true)
.setSessionToken("sessionToken-696552189")
.build();

ValidateAddressResponse actualResponse = client.validateAddress(request);
Expand All @@ -102,6 +103,7 @@ public void validateAddressTest() throws Exception {
Assert.assertEquals(request.getAddress(), actualRequest.getAddress());
Assert.assertEquals(request.getPreviousResponseId(), actualRequest.getPreviousResponseId());
Assert.assertEquals(request.getEnableUspsCass(), actualRequest.getEnableUspsCass());
Assert.assertEquals(request.getSessionToken(), actualRequest.getSessionToken());
Assert.assertTrue(
channelProvider.isHeaderSent(
ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
Expand All @@ -119,6 +121,7 @@ public void validateAddressExceptionTest() throws Exception {
.setAddress(PostalAddress.newBuilder().build())
.setPreviousResponseId("previousResponseId468754323")
.setEnableUspsCass(true)
.setSessionToken("sessionToken-696552189")
.build();
client.validateAddress(request);
Assert.fail("No exception raised");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -435,9 +435,11 @@ public boolean getInferred() {
*
*
* <pre>
* Indicates the spelling of the component name was corrected in a minor way,
* for example by switching two characters that appeared in the wrong order.
* This indicates a cosmetic change.
* Indicates a correction to a misspelling in the component name. The API
* does not always flag changes from one spelling variant to another, such as
* when changing "centre" to "center". It also does not always flag common
* misspellings, such as when changing "Amphitheater Pkwy" to "Amphitheatre
* Pkwy".
* </pre>
*
* <code>bool spell_corrected = 5;</code>
Expand Down Expand Up @@ -1475,9 +1477,11 @@ public Builder clearInferred() {
*
*
* <pre>
* Indicates the spelling of the component name was corrected in a minor way,
* for example by switching two characters that appeared in the wrong order.
* This indicates a cosmetic change.
* Indicates a correction to a misspelling in the component name. The API
* does not always flag changes from one spelling variant to another, such as
* when changing "centre" to "center". It also does not always flag common
* misspellings, such as when changing "Amphitheater Pkwy" to "Amphitheatre
* Pkwy".
* </pre>
*
* <code>bool spell_corrected = 5;</code>
Expand All @@ -1492,9 +1496,11 @@ public boolean getSpellCorrected() {
*
*
* <pre>
* Indicates the spelling of the component name was corrected in a minor way,
* for example by switching two characters that appeared in the wrong order.
* This indicates a cosmetic change.
* Indicates a correction to a misspelling in the component name. The API
* does not always flag changes from one spelling variant to another, such as
* when changing "centre" to "center". It also does not always flag common
* misspellings, such as when changing "Amphitheater Pkwy" to "Amphitheatre
* Pkwy".
* </pre>
*
* <code>bool spell_corrected = 5;</code>
Expand All @@ -1513,9 +1519,11 @@ public Builder setSpellCorrected(boolean value) {
*
*
* <pre>
* Indicates the spelling of the component name was corrected in a minor way,
* for example by switching two characters that appeared in the wrong order.
* This indicates a cosmetic change.
* Indicates a correction to a misspelling in the component name. The API
* does not always flag changes from one spelling variant to another, such as
* when changing "centre" to "center". It also does not always flag common
* misspellings, such as when changing "Amphitheater Pkwy" to "Amphitheatre
* Pkwy".
* </pre>
*
* <code>bool spell_corrected = 5;</code>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,11 @@ public interface AddressComponentOrBuilder
*
*
* <pre>
* Indicates the spelling of the component name was corrected in a minor way,
* for example by switching two characters that appeared in the wrong order.
* This indicates a cosmetic change.
* Indicates a correction to a misspelling in the component name. The API
* does not always flag changes from one spelling variant to another, such as
* when changing "centre" to "center". It also does not always flag common
* misspellings, such as when changing "Amphitheater Pkwy" to "Amphitheatre
* Pkwy".
* </pre>
*
* <code>bool spell_corrected = 5;</code>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,62 +71,63 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "proto\032/google/maps/addressvalidation/v1/"
+ "metadata.proto\0320google/maps/addressvalid"
+ "ation/v1/usps_data.proto\032 google/type/po"
+ "stal_address.proto\"\202\001\n\026ValidateAddressRe"
+ "stal_address.proto\"\236\001\n\026ValidateAddressRe"
+ "quest\0220\n\007address\030\001 \001(\0132\032.google.type.Pos"
+ "talAddressB\003\340A\002\022\034\n\024previous_response_id\030"
+ "\002 \001(\t\022\030\n\020enable_usps_cass\030\003 \001(\010\"r\n\027Valid"
+ "ateAddressResponse\022B\n\006result\030\001 \001(\01322.goo"
+ "gle.maps.addressvalidation.v1.Validation"
+ "Result\022\023\n\013response_id\030\002 \001(\t\"\313\002\n ProvideV"
+ "alidationFeedbackRequest\022p\n\nconclusion\030\001"
+ " \001(\0162W.google.maps.addressvalidation.v1."
+ "ProvideValidationFeedbackRequest.Validat"
+ "ionConclusionB\003\340A\002\022\030\n\013response_id\030\002 \001(\tB"
+ "\003\340A\002\"\232\001\n\024ValidationConclusion\022%\n!VALIDAT"
+ "ION_CONCLUSION_UNSPECIFIED\020\000\022\032\n\026VALIDATE"
+ "D_VERSION_USED\020\001\022\025\n\021USER_VERSION_USED\020\002\022"
+ "\034\n\030UNVALIDATED_VERSION_USED\020\003\022\n\n\006UNUSED\020"
+ "\004\"#\n!ProvideValidationFeedbackResponse\"\312"
+ "\002\n\020ValidationResult\022:\n\007verdict\030\001 \001(\0132).g"
+ "oogle.maps.addressvalidation.v1.Verdict\022"
+ ":\n\007address\030\002 \001(\0132).google.maps.addressva"
+ "lidation.v1.Address\022:\n\007geocode\030\003 \001(\0132).g"
+ "oogle.maps.addressvalidation.v1.Geocode\022"
+ "C\n\010metadata\030\004 \001(\01321.google.maps.addressv"
+ "alidation.v1.AddressMetadata\022=\n\tusps_dat"
+ "a\030\005 \001(\0132*.google.maps.addressvalidation."
+ "v1.UspsData\"\211\004\n\007Verdict\022P\n\021input_granula"
+ "rity\030\001 \001(\01625.google.maps.addressvalidati"
+ "on.v1.Verdict.Granularity\022U\n\026validation_"
+ "granularity\030\002 \001(\01625.google.maps.addressv"
+ "alidation.v1.Verdict.Granularity\022R\n\023geoc"
+ "ode_granularity\030\003 \001(\01625.google.maps.addr"
+ "essvalidation.v1.Verdict.Granularity\022\030\n\020"
+ "address_complete\030\004 \001(\010\022\"\n\032has_unconfirme"
+ "d_components\030\005 \001(\010\022\037\n\027has_inferred_compo"
+ "nents\030\006 \001(\010\022\037\n\027has_replaced_components\030\007"
+ " \001(\010\"\200\001\n\013Granularity\022\033\n\027GRANULARITY_UNSP"
+ "ECIFIED\020\000\022\017\n\013SUB_PREMISE\020\001\022\013\n\007PREMISE\020\002\022"
+ "\025\n\021PREMISE_PROXIMITY\020\003\022\t\n\005BLOCK\020\004\022\t\n\005ROU"
+ "TE\020\005\022\t\n\005OTHER\020\0062\262\003\n\021AddressValidation\022\246\001"
+ "\n\017ValidateAddress\0228.google.maps.addressv"
+ "alidation.v1.ValidateAddressRequest\0329.go"
+ "ogle.maps.addressvalidation.v1.ValidateA"
+ "ddressResponse\"\036\202\323\344\223\002\030\"\023/v1:validateAddr"
+ "ess:\001*\022\316\001\n\031ProvideValidationFeedback\022B.g"
+ "oogle.maps.addressvalidation.v1.ProvideV"
+ "alidationFeedbackRequest\032C.google.maps.a"
+ "\002 \001(\t\022\030\n\020enable_usps_cass\030\003 \001(\010\022\032\n\rsessi"
+ "on_token\030\005 \001(\tB\003\340A\001\"r\n\027ValidateAddressRe"
+ "sponse\022B\n\006result\030\001 \001(\01322.google.maps.add"
+ "ressvalidation.v1.ValidationResult\022\023\n\013re"
+ "sponse_id\030\002 \001(\t\"\313\002\n ProvideValidationFee"
+ "dbackRequest\022p\n\nconclusion\030\001 \001(\0162W.googl"
+ "e.maps.addressvalidation.v1.ProvideValid"
+ "ationFeedbackRequest.ValidationConclusio"
+ "nB\003\340A\002\022\030\n\013response_id\030\002 \001(\tB\003\340A\002\"\232\001\n\024Val"
+ "idationConclusion\022%\n!VALIDATION_CONCLUSI"
+ "ON_UNSPECIFIED\020\000\022\032\n\026VALIDATED_VERSION_US"
+ "ED\020\001\022\025\n\021USER_VERSION_USED\020\002\022\034\n\030UNVALIDAT"
+ "ED_VERSION_USED\020\003\022\n\n\006UNUSED\020\004\"#\n!Provide"
+ "ValidationFeedbackResponse\"\312\002\n\020Validatio"
+ "nResult\022:\n\007verdict\030\001 \001(\0132).google.maps.a"
+ "ddressvalidation.v1.Verdict\022:\n\007address\030\002"
+ " \001(\0132).google.maps.addressvalidation.v1."
+ "Address\022:\n\007geocode\030\003 \001(\0132).google.maps.a"
+ "ddressvalidation.v1.Geocode\022C\n\010metadata\030"
+ "\004 \001(\01321.google.maps.addressvalidation.v1"
+ ".AddressMetadata\022=\n\tusps_data\030\005 \001(\0132*.go"
+ "ogle.maps.addressvalidation.v1.UspsData\""
+ "\211\004\n\007Verdict\022P\n\021input_granularity\030\001 \001(\01625"
+ ".google.maps.addressvalidation.v1.Verdic"
+ "t.Granularity\022U\n\026validation_granularity\030"
+ "\002 \001(\01625.google.maps.addressvalidation.v1"
+ ".Verdict.Granularity\022R\n\023geocode_granular"
+ "ity\030\003 \001(\01625.google.maps.addressvalidatio"
+ "n.v1.Verdict.Granularity\022\030\n\020address_comp"
+ "lete\030\004 \001(\010\022\"\n\032has_unconfirmed_components"
+ "\030\005 \001(\010\022\037\n\027has_inferred_components\030\006 \001(\010\022"
+ "\037\n\027has_replaced_components\030\007 \001(\010\"\200\001\n\013Gra"
+ "nularity\022\033\n\027GRANULARITY_UNSPECIFIED\020\000\022\017\n"
+ "\013SUB_PREMISE\020\001\022\013\n\007PREMISE\020\002\022\025\n\021PREMISE_P"
+ "ROXIMITY\020\003\022\t\n\005BLOCK\020\004\022\t\n\005ROUTE\020\005\022\t\n\005OTHE"
+ "R\020\0062\262\003\n\021AddressValidation\022\246\001\n\017ValidateAd"
+ "dress\0228.google.maps.addressvalidation.v1"
+ ".ValidateAddressRequest\0329.google.maps.ad"
+ "dressvalidation.v1.ValidateAddressRespon"
+ "se\"\036\202\323\344\223\002\030\"\023/v1:validateAddress:\001*\022\316\001\n\031P"
+ "rovideValidationFeedback\022B.google.maps.a"
+ "ddressvalidation.v1.ProvideValidationFee"
+ "dbackResponse\"(\202\323\344\223\002\"\"\035/v1:provideValida"
+ "tionFeedback:\001*\032#\312A addressvalidation.go"
+ "ogleapis.comB\232\002\n$com.google.maps.address"
+ "validation.v1B\035AddressValidationServiceP"
+ "rotoP\001ZXcloud.google.com/go/maps/address"
+ "validation/apiv1/addressvalidationpb;add"
+ "ressvalidationpb\370\001\001\242\002\007GMPAVV1\252\002 Google.M"
+ "aps.AddressValidation.V1\312\002 Google\\Maps\\A"
+ "ddressValidation\\V1\352\002#Google::Maps::Addr"
+ "essValidation::V1b\006proto3"
+ "dbackRequest\032C.google.maps.addressvalida"
+ "tion.v1.ProvideValidationFeedbackRespons"
+ "e\"(\202\323\344\223\002\"\"\035/v1:provideValidationFeedback"
+ ":\001*\032#\312A addressvalidation.googleapis.com"
+ "B\232\002\n$com.google.maps.addressvalidation.v"
+ "1B\035AddressValidationServiceProtoP\001ZXclou"
+ "d.google.com/go/maps/addressvalidation/a"
+ "piv1/addressvalidationpb;addressvalidati"
+ "onpb\370\001\001\242\002\007GMPAVV1\252\002 Google.Maps.AddressV"
+ "alidation.V1\312\002 Google\\Maps\\AddressValida"
+ "tion\\V1\352\002#Google::Maps::AddressValidatio"
+ "n::V1b\006proto3"
};
descriptor =
com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
Expand All @@ -147,7 +148,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_maps_addressvalidation_v1_ValidateAddressRequest_descriptor,
new java.lang.String[] {
"Address", "PreviousResponseId", "EnableUspsCass",
"Address", "PreviousResponseId", "EnableUspsCass", "SessionToken",
});
internal_static_google_maps_addressvalidation_v1_ValidateAddressResponse_descriptor =
getDescriptor().getMessageTypes().get(1);
Expand Down
Loading

0 comments on commit 7158e2d

Please sign in to comment.