Skip to content

Commit

Permalink
Regenerate translate client (#5001)
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshi-automation authored and sduskis committed Apr 24, 2019
1 parent ab22057 commit 1853db4
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,24 +114,12 @@ public class TranslationServiceClient implements BackgroundResource {
private final TranslationServiceStub stub;
private final OperationsClient operationsClient;

private static final PathTemplate LOCATION_PATH_TEMPLATE =
PathTemplate.createWithoutUrlEncoding("projects/{project}/locations/{location}");

private static final PathTemplate GLOSSARY_PATH_TEMPLATE =
PathTemplate.createWithoutUrlEncoding(
"projects/{project}/locations/{location}/glossaries/{glossary}");

/**
* Formats a string containing the fully-qualified path to represent a location resource.
*
* @deprecated Use the {@link LocationName} class instead.
*/
@Deprecated
public static final String formatLocationName(String project, String location) {
return LOCATION_PATH_TEMPLATE.instantiate(
"project", project,
"location", location);
}
private static final PathTemplate LOCATION_PATH_TEMPLATE =
PathTemplate.createWithoutUrlEncoding("projects/{project}/locations/{location}");

/**
* Formats a string containing the fully-qualified path to represent a glossary resource.
Expand All @@ -147,23 +135,15 @@ public static final String formatGlossaryName(String project, String location, S
}

/**
* Parses the project from the given fully-qualified path which represents a location resource.
*
* @deprecated Use the {@link LocationName} class instead.
*/
@Deprecated
public static final String parseProjectFromLocationName(String locationName) {
return LOCATION_PATH_TEMPLATE.parse(locationName).get("project");
}

/**
* Parses the location from the given fully-qualified path which represents a location resource.
* Formats a string containing the fully-qualified path to represent a location resource.
*
* @deprecated Use the {@link LocationName} class instead.
*/
@Deprecated
public static final String parseLocationFromLocationName(String locationName) {
return LOCATION_PATH_TEMPLATE.parse(locationName).get("location");
public static final String formatLocationName(String project, String location) {
return LOCATION_PATH_TEMPLATE.instantiate(
"project", project,
"location", location);
}

/**
Expand Down Expand Up @@ -196,6 +176,26 @@ public static final String parseGlossaryFromGlossaryName(String glossaryName) {
return GLOSSARY_PATH_TEMPLATE.parse(glossaryName).get("glossary");
}

/**
* Parses the project from the given fully-qualified path which represents a location resource.
*
* @deprecated Use the {@link LocationName} class instead.
*/
@Deprecated
public static final String parseProjectFromLocationName(String locationName) {
return LOCATION_PATH_TEMPLATE.parse(locationName).get("project");
}

/**
* Parses the location from the given fully-qualified path which represents a location resource.
*
* @deprecated Use the {@link LocationName} class instead.
*/
@Deprecated
public static final String parseLocationFromLocationName(String locationName) {
return LOCATION_PATH_TEMPLATE.parse(locationName).get("location");
}

/** Constructs an instance of TranslationServiceClient with default settings. */
public static final TranslationServiceClient create() throws IOException {
return create(TranslationServiceSettings.newBuilder().build());
Expand Down
10 changes: 5 additions & 5 deletions google-cloud-clients/google-cloud-translate/synth.metadata
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"updateTime": "2019-04-01T22:20:44.823128Z",
"updateTime": "2019-04-23T07:58:00.510493Z",
"sources": [
{
"generator": {
"name": "artman",
"version": "0.16.22",
"dockerImage": "googleapis/artman@sha256:e7f9554322a8aa1416c122c918fdc4cdec8cfe816f027fc948dec0be7edef320"
"version": "0.17.0",
"dockerImage": "googleapis/artman@sha256:c58f4ec3838eb4e0718eb1bccc6512bd6850feaa85a360a9e38f6f848ec73bc2"
}
},
{
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
"sha": "1e20c384c2f8197d2b09d9e11bdbc28657e5aee1",
"internalRef": "241403898"
"sha": "547e19e7df398e9290e8e3674d7351efc500f9b0",
"internalRef": "244712781"
}
}
],
Expand Down

0 comments on commit 1853db4

Please sign in to comment.