google-cloud-translate-v3 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -64,6 +64,25 @@ module Google
64
64
  "projects/#{project}/locations/#{location}/adaptiveMtDatasets/#{dataset}/adaptiveMtFiles/#{file}"
65
65
  end
66
66
 
67
+ ##
68
+ # Create a fully-qualified Dataset resource string.
69
+ #
70
+ # The resource will be in the following format:
71
+ #
72
+ # `projects/{project}/locations/{location}/datasets/{dataset}`
73
+ #
74
+ # @param project [String]
75
+ # @param location [String]
76
+ # @param dataset [String]
77
+ #
78
+ # @return [::String]
79
+ def dataset_path project:, location:, dataset:
80
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
81
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
82
+
83
+ "projects/#{project}/locations/#{location}/datasets/#{dataset}"
84
+ end
85
+
67
86
  ##
68
87
  # Create a fully-qualified Glossary resource string.
69
88
  #
@@ -83,6 +102,27 @@ module Google
83
102
  "projects/#{project}/locations/#{location}/glossaries/#{glossary}"
84
103
  end
85
104
 
105
+ ##
106
+ # Create a fully-qualified GlossaryEntry resource string.
107
+ #
108
+ # The resource will be in the following format:
109
+ #
110
+ # `projects/{project}/locations/{location}/glossaries/{glossary}/glossaryEntries/{glossary_entry}`
111
+ #
112
+ # @param project [String]
113
+ # @param location [String]
114
+ # @param glossary [String]
115
+ # @param glossary_entry [String]
116
+ #
117
+ # @return [::String]
118
+ def glossary_entry_path project:, location:, glossary:, glossary_entry:
119
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
120
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
121
+ raise ::ArgumentError, "glossary cannot contain /" if glossary.to_s.include? "/"
122
+
123
+ "projects/#{project}/locations/#{location}/glossaries/#{glossary}/glossaryEntries/#{glossary_entry}"
124
+ end
125
+
86
126
  ##
87
127
  # Create a fully-qualified Location resource string.
88
128
  #
@@ -100,6 +140,25 @@ module Google
100
140
  "projects/#{project}/locations/#{location}"
101
141
  end
102
142
 
143
+ ##
144
+ # Create a fully-qualified Model resource string.
145
+ #
146
+ # The resource will be in the following format:
147
+ #
148
+ # `projects/{project}/locations/{location}/models/{model}`
149
+ #
150
+ # @param project [String]
151
+ # @param location [String]
152
+ # @param model [String]
153
+ #
154
+ # @return [::String]
155
+ def model_path project:, location:, model:
156
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
157
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
158
+
159
+ "projects/#{project}/locations/#{location}/models/#{model}"
160
+ end
161
+
103
162
  extend self
104
163
  end
105
164
  end