Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regenerate translate client #5001

Merged
merged 1 commit into from
Apr 24, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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