You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

136 lines
3.3 KiB

  1. // Copyright 2018 Google LLC
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // https://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. package datatransfer
  15. // ProjectPath returns the path for the project resource.
  16. //
  17. // Deprecated: Use
  18. // fmt.Sprintf("projects/%s", project)
  19. // instead.
  20. func ProjectPath(project string) string {
  21. return "" +
  22. "projects/" +
  23. project +
  24. ""
  25. }
  26. // LocationPath returns the path for the location resource.
  27. //
  28. // Deprecated: Use
  29. // fmt.Sprintf("projects/%s/locations/%s", project, location)
  30. // instead.
  31. func LocationPath(project, location string) string {
  32. return "" +
  33. "projects/" +
  34. project +
  35. "/locations/" +
  36. location +
  37. ""
  38. }
  39. // LocationDataSourcePath returns the path for the location data source resource.
  40. //
  41. // Deprecated: Use
  42. // fmt.Sprintf("projects/%s/locations/%s/dataSources/%s", project, location, dataSource)
  43. // instead.
  44. func LocationDataSourcePath(project, location, dataSource string) string {
  45. return "" +
  46. "projects/" +
  47. project +
  48. "/locations/" +
  49. location +
  50. "/dataSources/" +
  51. dataSource +
  52. ""
  53. }
  54. // LocationTransferConfigPath returns the path for the location transfer config resource.
  55. //
  56. // Deprecated: Use
  57. // fmt.Sprintf("projects/%s/locations/%s/transferConfigs/%s", project, location, transferConfig)
  58. // instead.
  59. func LocationTransferConfigPath(project, location, transferConfig string) string {
  60. return "" +
  61. "projects/" +
  62. project +
  63. "/locations/" +
  64. location +
  65. "/transferConfigs/" +
  66. transferConfig +
  67. ""
  68. }
  69. // LocationRunPath returns the path for the location run resource.
  70. //
  71. // Deprecated: Use
  72. // fmt.Sprintf("projects/%s/locations/%s/transferConfigs/%s/runs/%s", project, location, transferConfig, run)
  73. // instead.
  74. func LocationRunPath(project, location, transferConfig, run string) string {
  75. return "" +
  76. "projects/" +
  77. project +
  78. "/locations/" +
  79. location +
  80. "/transferConfigs/" +
  81. transferConfig +
  82. "/runs/" +
  83. run +
  84. ""
  85. }
  86. // DataSourcePath returns the path for the data source resource.
  87. //
  88. // Deprecated: Use
  89. // fmt.Sprintf("projects/%s/dataSources/%s", project, dataSource)
  90. // instead.
  91. func DataSourcePath(project, dataSource string) string {
  92. return "" +
  93. "projects/" +
  94. project +
  95. "/dataSources/" +
  96. dataSource +
  97. ""
  98. }
  99. // TransferConfigPath returns the path for the transfer config resource.
  100. //
  101. // Deprecated: Use
  102. // fmt.Sprintf("projects/%s/transferConfigs/%s", project, transferConfig)
  103. // instead.
  104. func TransferConfigPath(project, transferConfig string) string {
  105. return "" +
  106. "projects/" +
  107. project +
  108. "/transferConfigs/" +
  109. transferConfig +
  110. ""
  111. }
  112. // RunPath returns the path for the run resource.
  113. //
  114. // Deprecated: Use
  115. // fmt.Sprintf("projects/%s/transferConfigs/%s/runs/%s", project, transferConfig, run)
  116. // instead.
  117. func RunPath(project, transferConfig, run string) string {
  118. return "" +
  119. "projects/" +
  120. project +
  121. "/transferConfigs/" +
  122. transferConfig +
  123. "/runs/" +
  124. run +
  125. ""
  126. }