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 15 package datatransfer 16 17 // ProjectPath returns the path for the project resource. 18 // 19 // Deprecated: Use 20 // 21 // fmt.Sprintf("projects/%s", project) 22 // 23 // instead. 24 func ProjectPath(project string) string { 25 return "" + 26 "projects/" + 27 project + 28 "" 29 } 30 31 // LocationPath returns the path for the location resource. 32 // 33 // Deprecated: Use 34 // 35 // fmt.Sprintf("projects/%s/locations/%s", project, location) 36 // 37 // instead. 38 func LocationPath(project, location string) string { 39 return "" + 40 "projects/" + 41 project + 42 "/locations/" + 43 location + 44 "" 45 } 46 47 // LocationDataSourcePath returns the path for the location data source resource. 48 // 49 // Deprecated: Use 50 // 51 // fmt.Sprintf("projects/%s/locations/%s/dataSources/%s", project, location, dataSource) 52 // 53 // instead. 54 func LocationDataSourcePath(project, location, dataSource string) string { 55 return "" + 56 "projects/" + 57 project + 58 "/locations/" + 59 location + 60 "/dataSources/" + 61 dataSource + 62 "" 63 } 64 65 // LocationTransferConfigPath returns the path for the location transfer config resource. 66 // 67 // Deprecated: Use 68 // 69 // fmt.Sprintf("projects/%s/locations/%s/transferConfigs/%s", project, location, transferConfig) 70 // 71 // instead. 72 func LocationTransferConfigPath(project, location, transferConfig string) string { 73 return "" + 74 "projects/" + 75 project + 76 "/locations/" + 77 location + 78 "/transferConfigs/" + 79 transferConfig + 80 "" 81 } 82 83 // LocationRunPath returns the path for the location run resource. 84 // 85 // Deprecated: Use 86 // 87 // fmt.Sprintf("projects/%s/locations/%s/transferConfigs/%s/runs/%s", project, location, transferConfig, run) 88 // 89 // instead. 90 func LocationRunPath(project, location, transferConfig, run string) string { 91 return "" + 92 "projects/" + 93 project + 94 "/locations/" + 95 location + 96 "/transferConfigs/" + 97 transferConfig + 98 "/runs/" + 99 run + 100 "" 101 } 102 103 // DataSourcePath returns the path for the data source resource. 104 // 105 // Deprecated: Use 106 // 107 // fmt.Sprintf("projects/%s/dataSources/%s", project, dataSource) 108 // 109 // instead. 110 func DataSourcePath(project, dataSource string) string { 111 return "" + 112 "projects/" + 113 project + 114 "/dataSources/" + 115 dataSource + 116 "" 117 } 118 119 // TransferConfigPath returns the path for the transfer config resource. 120 // 121 // Deprecated: Use 122 // 123 // fmt.Sprintf("projects/%s/transferConfigs/%s", project, transferConfig) 124 // 125 // instead. 126 func TransferConfigPath(project, transferConfig string) string { 127 return "" + 128 "projects/" + 129 project + 130 "/transferConfigs/" + 131 transferConfig + 132 "" 133 } 134 135 // RunPath returns the path for the run resource. 136 // 137 // Deprecated: Use 138 // 139 // fmt.Sprintf("projects/%s/transferConfigs/%s/runs/%s", project, transferConfig, run) 140 // 141 // instead. 142 func RunPath(project, transferConfig, run string) string { 143 return "" + 144 "projects/" + 145 project + 146 "/transferConfigs/" + 147 transferConfig + 148 "/runs/" + 149 run + 150 "" 151 } 152