Skip to content

Commit

Permalink
fix: resource name helpers fixed; enum, bytes, and Long types now acc…
Browse files Browse the repository at this point in the history
…ept strings (#99)

* [CHANGE ME] Re-generated  to pick up changes in the API or client library generator.

* fix: resource name helper functions

Co-authored-by: Alexander Fenster <[email protected]>
  • Loading branch information
yoshi-automation and alexander-fenster committed Jan 28, 2020
1 parent 92b4a66 commit da69a1e
Show file tree
Hide file tree
Showing 9 changed files with 15,873 additions and 15,481 deletions.
7,986 changes: 3,993 additions & 3,993 deletions packages/google-cloud-datacatalog/protos/protos.d.ts

Large diffs are not rendered by default.

20,450 changes: 10,225 additions & 10,225 deletions packages/google-cloud-datacatalog/protos/protos.js

Large diffs are not rendered by default.

2,396 changes: 1,198 additions & 1,198 deletions packages/google-cloud-datacatalog/protos/protos.json

Large diffs are not rendered by default.

155 changes: 120 additions & 35 deletions packages/google-cloud-datacatalog/src/v1beta1/data_catalog_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2675,55 +2675,76 @@ export class DataCatalogClient {
}

/**
* Return a fully-qualified entrygroup resource name string.
* Return a fully-qualified entryGroup resource name string.
*
* @param {string} project
* @param {string} location
* @param {string} entry_group
* @returns {string} Resource name string.
*/
entryGroupPath(project: string, location: string) {
return this._pathTemplates.entrygroupPathTemplate.render({
entryGroupPath(project: string, location: string, entryGroup: string) {
return this._pathTemplates.entryGroupPathTemplate.render({
project,
location,
entry_group: entryGroup,
});
}

/**
* Parse the project from EntryGroup resource.
*
* @param {string} entrygroupName
* @param {string} entryGroupName
* A fully-qualified path representing EntryGroup resource.
* @returns {string} A string representing the project.
*/
matchProjectFromEntryGroupName(entrygroupName: string) {
return this._pathTemplates.entrygroupPathTemplate.match(entrygroupName)
matchProjectFromEntryGroupName(entryGroupName: string) {
return this._pathTemplates.entryGroupPathTemplate.match(entryGroupName)
.project;
}

/**
* Parse the location from EntryGroup resource.
*
* @param {string} entrygroupName
* @param {string} entryGroupName
* A fully-qualified path representing EntryGroup resource.
* @returns {string} A string representing the location.
*/
matchLocationFromEntryGroupName(entrygroupName: string) {
return this._pathTemplates.entrygroupPathTemplate.match(entrygroupName)
matchLocationFromEntryGroupName(entryGroupName: string) {
return this._pathTemplates.entryGroupPathTemplate.match(entryGroupName)
.location;
}

/**
* Parse the entry_group from EntryGroup resource.
*
* @param {string} entryGroupName
* A fully-qualified path representing EntryGroup resource.
* @returns {string} A string representing the entry_group.
*/
matchEntryGroupFromEntryGroupName(entryGroupName: string) {
return this._pathTemplates.entryGroupPathTemplate.match(entryGroupName)
.entry_group;
}

/**
* Return a fully-qualified entry resource name string.
*
* @param {string} project
* @param {string} location
* @param {string} entry_group
* @param {string} entry
* @returns {string} Resource name string.
*/
entryPath(project: string, location: string, entry: string) {
entryPath(
project: string,
location: string,
entryGroup: string,
entry: string
) {
return this._pathTemplates.entryPathTemplate.render({
project,
location,
entry_group: entryGroup,
entry,
});
}
Expand All @@ -2750,6 +2771,17 @@ export class DataCatalogClient {
return this._pathTemplates.entryPathTemplate.match(entryName).location;
}

/**
* Parse the entry_group from Entry resource.
*
* @param {string} entryName
* A fully-qualified path representing Entry resource.
* @returns {string} A string representing the entry_group.
*/
matchEntryGroupFromEntryName(entryName: string) {
return this._pathTemplates.entryPathTemplate.match(entryName).entry_group;
}

/**
* Parse the entry from Entry resource.
*
Expand All @@ -2762,56 +2794,78 @@ export class DataCatalogClient {
}

/**
* Return a fully-qualified tagtemplate resource name string.
* Return a fully-qualified tagTemplate resource name string.
*
* @param {string} project
* @param {string} location
* @param {string} tag_template
* @returns {string} Resource name string.
*/
tagTemplatePath(project: string, location: string) {
return this._pathTemplates.tagtemplatePathTemplate.render({
tagTemplatePath(project: string, location: string, tagTemplate: string) {
return this._pathTemplates.tagTemplatePathTemplate.render({
project,
location,
tag_template: tagTemplate,
});
}

/**
* Parse the project from TagTemplate resource.
*
* @param {string} tagtemplateName
* @param {string} tagTemplateName
* A fully-qualified path representing TagTemplate resource.
* @returns {string} A string representing the project.
*/
matchProjectFromTagTemplateName(tagtemplateName: string) {
return this._pathTemplates.tagtemplatePathTemplate.match(tagtemplateName)
matchProjectFromTagTemplateName(tagTemplateName: string) {
return this._pathTemplates.tagTemplatePathTemplate.match(tagTemplateName)
.project;
}

/**
* Parse the location from TagTemplate resource.
*
* @param {string} tagtemplateName
* @param {string} tagTemplateName
* A fully-qualified path representing TagTemplate resource.
* @returns {string} A string representing the location.
*/
matchLocationFromTagTemplateName(tagtemplateName: string) {
return this._pathTemplates.tagtemplatePathTemplate.match(tagtemplateName)
matchLocationFromTagTemplateName(tagTemplateName: string) {
return this._pathTemplates.tagTemplatePathTemplate.match(tagTemplateName)
.location;
}

/**
* Parse the tag_template from TagTemplate resource.
*
* @param {string} tagTemplateName
* A fully-qualified path representing TagTemplate resource.
* @returns {string} A string representing the tag_template.
*/
matchTagTemplateFromTagTemplateName(tagTemplateName: string) {
return this._pathTemplates.tagTemplatePathTemplate.match(tagTemplateName)
.tag_template;
}

/**
* Return a fully-qualified tag resource name string.
*
* @param {string} project
* @param {string} location
* @param {string} entry_group
* @param {string} entry
* @param {string} tag
* @returns {string} Resource name string.
*/
tagPath(project: string, location: string, entry: string, tag: string) {
tagPath(
project: string,
location: string,
entryGroup: string,
entry: string,
tag: string
) {
return this._pathTemplates.tagPathTemplate.render({
project,
location,
entry_group: entryGroup,
entry,
tag,
});
Expand Down Expand Up @@ -2839,6 +2893,17 @@ export class DataCatalogClient {
return this._pathTemplates.tagPathTemplate.match(tagName).location;
}

/**
* Parse the entry_group from Tag resource.
*
* @param {string} tagName
* A fully-qualified path representing Tag resource.
* @returns {string} A string representing the entry_group.
*/
matchEntryGroupFromTagName(tagName: string) {
return this._pathTemplates.tagPathTemplate.match(tagName).entry_group;
}

/**
* Parse the entry from Tag resource.
*
Expand All @@ -2862,57 +2927,77 @@ export class DataCatalogClient {
}

/**
* Return a fully-qualified tagtemplatefield resource name string.
* Return a fully-qualified tagTemplateField resource name string.
*
* @param {string} project
* @param {string} location
* @param {string} tag_template
* @param {string} field
* @returns {string} Resource name string.
*/
tagTemplateFieldPath(project: string, location: string, field: string) {
return this._pathTemplates.tagtemplatefieldPathTemplate.render({
tagTemplateFieldPath(
project: string,
location: string,
tagTemplate: string,
field: string
) {
return this._pathTemplates.tagTemplateFieldPathTemplate.render({
project,
location,
tag_template: tagTemplate,
field,
});
}

/**
* Parse the project from TagTemplateField resource.
*
* @param {string} tagtemplatefieldName
* @param {string} tagTemplateFieldName
* A fully-qualified path representing TagTemplateField resource.
* @returns {string} A string representing the project.
*/
matchProjectFromTagTemplateFieldName(tagtemplatefieldName: string) {
return this._pathTemplates.tagtemplatefieldPathTemplate.match(
tagtemplatefieldName
matchProjectFromTagTemplateFieldName(tagTemplateFieldName: string) {
return this._pathTemplates.tagTemplateFieldPathTemplate.match(
tagTemplateFieldName
).project;
}

/**
* Parse the location from TagTemplateField resource.
*
* @param {string} tagtemplatefieldName
* @param {string} tagTemplateFieldName
* A fully-qualified path representing TagTemplateField resource.
* @returns {string} A string representing the location.
*/
matchLocationFromTagTemplateFieldName(tagtemplatefieldName: string) {
return this._pathTemplates.tagtemplatefieldPathTemplate.match(
tagtemplatefieldName
matchLocationFromTagTemplateFieldName(tagTemplateFieldName: string) {
return this._pathTemplates.tagTemplateFieldPathTemplate.match(
tagTemplateFieldName
).location;
}

/**
* Parse the tag_template from TagTemplateField resource.
*
* @param {string} tagTemplateFieldName
* A fully-qualified path representing TagTemplateField resource.
* @returns {string} A string representing the tag_template.
*/
matchTagTemplateFromTagTemplateFieldName(tagTemplateFieldName: string) {
return this._pathTemplates.tagTemplateFieldPathTemplate.match(
tagTemplateFieldName
).tag_template;
}

/**
* Parse the field from TagTemplateField resource.
*
* @param {string} tagtemplatefieldName
* @param {string} tagTemplateFieldName
* A fully-qualified path representing TagTemplateField resource.
* @returns {string} A string representing the field.
*/
matchFieldFromTagTemplateFieldName(tagtemplatefieldName: string) {
return this._pathTemplates.tagtemplatefieldPathTemplate.match(
tagtemplatefieldName
matchFieldFromTagTemplateFieldName(tagTemplateFieldName: string) {
return this._pathTemplates.tagTemplateFieldPathTemplate.match(
tagTemplateFieldName
).field;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[
"../../protos/google/cloud/datacatalog/v1beta1/tags.proto",
"../../protos/google/cloud/datacatalog/v1beta1/timestamps.proto",
"../../protos/google/cloud/datacatalog/v1beta1/gcs_fileset_spec.proto",
"../../protos/google/cloud/datacatalog/v1beta1/schema.proto",
"../../protos/google/cloud/datacatalog/v1beta1/policytagmanager.proto",
"../../protos/google/cloud/datacatalog/v1beta1/tags.proto",
"../../protos/google/cloud/datacatalog/v1beta1/table_spec.proto",
"../../protos/google/cloud/datacatalog/v1beta1/search.proto",
"../../protos/google/cloud/datacatalog/v1beta1/gcs_fileset_spec.proto",
"../../protos/google/cloud/datacatalog/v1beta1/policytagmanagerserialization.proto",
"../../protos/google/cloud/datacatalog/v1beta1/datacatalog.proto"
"../../protos/google/cloud/datacatalog/v1beta1/table_spec.proto",
"../../protos/google/cloud/datacatalog/v1beta1/datacatalog.proto",
"../../protos/google/cloud/datacatalog/v1beta1/policytagmanager.proto",
"../../protos/google/cloud/datacatalog/v1beta1/policytagmanagerserialization.proto"
]
Loading

0 comments on commit da69a1e

Please sign in to comment.