@@ -115,32 +115,44 @@ export class ProjectManagementRequestHandler {
115115 this . httpClient = new AuthorizedHttpClient ( app ) ;
116116 }
117117
118- public listAndroidApps ( projectId : string ) : Promise < object > {
118+ /**
119+ * @param {string } parentResourceName Fully-qualified resource name of the project whose Android
120+ * apps you want to list.
121+ */
122+ public listAndroidApps ( parentResourceName : string ) : Promise < object > {
119123 return this . invokeRequestHandler (
120124 'GET' ,
121- `projects/ ${ projectId } /androidApps?page_size=${ LIST_APPS_MAX_PAGE_SIZE } ` ,
125+ `${ parentResourceName } /androidApps?page_size=${ LIST_APPS_MAX_PAGE_SIZE } ` ,
122126 /* requestData */ null ,
123127 'v1beta1' ) ;
124128 }
125129
126- public listIosApps ( projectId : string ) : Promise < object > {
130+ /**
131+ * @param {string } parentResourceName Fully-qualified resource name of the project whose iOS apps
132+ * you want to list.
133+ */
134+ public listIosApps ( parentResourceName : string ) : Promise < object > {
127135 return this . invokeRequestHandler (
128136 'GET' ,
129- `projects/ ${ projectId } /iosApps?page_size=${ LIST_APPS_MAX_PAGE_SIZE } ` ,
137+ `${ parentResourceName } /iosApps?page_size=${ LIST_APPS_MAX_PAGE_SIZE } ` ,
130138 /* requestData */ null ,
131139 'v1beta1' ) ;
132140 }
133141
142+ /**
143+ * @param {string } parentResourceName Fully-qualified resource name of the project that you want
144+ * to create the Android app within.
145+ */
134146 public createAndroidApp (
135- projectId : string , packageName : string , displayName ?: string ) : Promise < object > {
147+ parentResourceName : string , packageName : string , displayName ?: string ) : Promise < object > {
136148 const requestData : any = {
137149 packageName,
138150 } ;
139151 if ( validator . isNonEmptyString ( displayName ) ) {
140152 requestData . displayName = displayName ;
141153 }
142154 return this
143- . invokeRequestHandler ( 'POST' , `projects/ ${ projectId } /androidApps` , requestData , 'v1beta1' )
155+ . invokeRequestHandler ( 'POST' , `${ parentResourceName } /androidApps` , requestData , 'v1beta1' )
144156 . then ( ( responseData : any ) => {
145157 assertServerResponse (
146158 validator . isNonNullObject ( responseData ) ,
@@ -154,16 +166,20 @@ export class ProjectManagementRequestHandler {
154166 } ) ;
155167 }
156168
169+ /**
170+ * @param {string } parentResourceName Fully-qualified resource name of the project that you want
171+ * to create the iOS app within.
172+ */
157173 public createIosApp (
158- projectId : string , bundleId : string , displayName ?: string ) : Promise < object > {
174+ parentResourceName : string , bundleId : string , displayName ?: string ) : Promise < object > {
159175 const requestData : any = {
160176 bundleId,
161177 } ;
162178 if ( validator . isNonEmptyString ( displayName ) ) {
163179 requestData . displayName = displayName ;
164180 }
165181 return this
166- . invokeRequestHandler ( 'POST' , `projects/ ${ projectId } /iosApps` , requestData , 'v1beta1' )
182+ . invokeRequestHandler ( 'POST' , `${ parentResourceName } /iosApps` , requestData , 'v1beta1' )
167183 . then ( ( responseData : any ) => {
168184 assertServerResponse (
169185 validator . isNonNullObject ( responseData ) ,
@@ -177,69 +193,69 @@ export class ProjectManagementRequestHandler {
177193 } ) ;
178194 }
179195
180- public getAndroidMetadata ( appId : string ) : Promise < object > {
181- return this . invokeRequestHandler (
182- 'GET' , `projects/-/androidApps/${ appId } ` , /* requestData */ null , 'v1beta1' ) ;
183- }
184-
185- public getIosMetadata ( appId : string ) : Promise < object > {
186- return this . invokeRequestHandler (
187- 'GET' , `projects/-/iosApps/${ appId } ` , /* requestData */ null , 'v1beta1' ) ;
188- }
189-
190- public setAndroidDisplayName ( appId : string , newDisplayName : string ) : Promise < void > {
191- const requestData = {
192- displayName : newDisplayName ,
193- } ;
194- return this
195- . invokeRequestHandler (
196- 'PATCH' ,
197- `projects/-/androidApps/${ appId } ?update_mask=display_name` ,
198- requestData ,
199- 'v1beta1' )
200- . then ( ( ) => null ) ;
201- }
202-
203- public setIosDisplayName ( appId : string , newDisplayName : string ) : Promise < void > {
196+ /**
197+ * @param {string } resourceName Fully-qualified resource name of the entity whose display name you
198+ * want to set.
199+ */
200+ public setDisplayName ( resourceName : string , newDisplayName : string ) : Promise < void > {
204201 const requestData = {
205202 displayName : newDisplayName ,
206203 } ;
207204 return this
208205 . invokeRequestHandler (
209- 'PATCH' , `projects/-/iosApps/ ${ appId } ?update_mask=display_name` , requestData , 'v1beta1' )
206+ 'PATCH' , `${ resourceName } ?update_mask=display_name` , requestData , 'v1beta1' )
210207 . then ( ( ) => null ) ;
211208 }
212209
213- public getAndroidShaCertificates ( appId : string ) : Promise < object > {
210+ /**
211+ * @param {string } parentResourceName Fully-qualified resource name of the Android app whose SHA
212+ * certificates you want to get.
213+ */
214+ public getAndroidShaCertificates ( parentResourceName : string ) : Promise < object > {
214215 return this . invokeRequestHandler (
215- 'GET' , `projects/-/androidApps/ ${ appId } /sha` , /* requestData */ null , 'v1beta1' ) ;
216+ 'GET' , `${ parentResourceName } /sha` , /* requestData */ null , 'v1beta1' ) ;
216217 }
217218
218- public addAndroidShaCertificate ( appId : string , certificate : ShaCertificate ) : Promise < void > {
219+ /**
220+ * @param {string } parentResourceName Fully-qualified resource name of the Android app that you
221+ * want to add the given SHA certificate to.
222+ */
223+ public addAndroidShaCertificate (
224+ parentResourceName : string , certificate : ShaCertificate ) : Promise < void > {
219225 const requestData = {
220226 shaHash : certificate . shaHash ,
221227 certType : CERT_TYPE_API_MAP [ certificate . certType ] ,
222228 } ;
223229 return this
224- . invokeRequestHandler ( 'POST' , `projects/-/androidApps/ ${ appId } /sha` , requestData , 'v1beta1' )
230+ . invokeRequestHandler ( 'POST' , `${ parentResourceName } /sha` , requestData , 'v1beta1' )
225231 . then ( ( ) => null ) ;
226232 }
227233
228- public deleteAndroidShaCertificate ( certificateToDelete : ShaCertificate ) : Promise < void > {
229- return this
230- . invokeRequestHandler (
231- 'DELETE' , certificateToDelete . resourceName , /* requestData */ null , 'v1beta1' )
232- . then ( ( ) => null ) ;
234+ /**
235+ * @param {string } parentResourceName Fully-qualified resource name of the app whose config you
236+ * want to get.
237+ */
238+ public getConfig ( parentResourceName : string ) : Promise < object > {
239+ return this . invokeRequestHandler (
240+ 'GET' , `${ parentResourceName } /config` , /* requestData */ null , 'v1beta1' ) ;
233241 }
234242
235- public getAndroidConfig ( appId : string ) : Promise < object > {
236- return this . invokeRequestHandler (
237- 'GET' , `projects/-/androidApps/${ appId } /config` , /* requestData */ null , 'v1beta1' ) ;
243+ /**
244+ * @param {string } parentResourceName Fully-qualified resource name of the entity that you want to
245+ * get.
246+ */
247+ public getResource ( parentResourceName : string ) : Promise < object > {
248+ return this . invokeRequestHandler ( 'GET' , parentResourceName , /* requestData */ null , 'v1beta1' ) ;
238249 }
239250
240- public getIosConfig ( appId : string ) : Promise < object > {
241- return this . invokeRequestHandler (
242- 'GET' , `projects/-/iosApps/${ appId } /config` , /* requestData */ null , 'v1beta1' ) ;
251+ /**
252+ * @param {string } resourceName Fully-qualified resource name of the entity that you want to
253+ * delete.
254+ */
255+ public deleteResource ( resourceName : string ) : Promise < void > {
256+ return this
257+ . invokeRequestHandler ( 'DELETE' , resourceName , /* requestData */ null , 'v1beta1' )
258+ . then ( ( ) => null ) ;
243259 }
244260
245261 private pollRemoteOperationWithExponentialBackoff (
0 commit comments