@@ -358,7 +358,7 @@ internal ApplicationTypeVersionsOperations (ServiceFabricManagementClient client
358
358
/// <return>
359
359
/// A response object containing the response body and response headers.
360
360
/// </return>
361
- public async System . Threading . Tasks . Task < Microsoft . Rest . Azure . AzureOperationResponse < ApplicationTypeVersionResourceList > > ListWithHttpMessagesAsync ( string resourceGroupName , string clusterName , string applicationTypeName , System . Collections . Generic . Dictionary < string , System . Collections . Generic . List < string > > customHeaders = null , System . Threading . CancellationToken cancellationToken = default ( System . Threading . CancellationToken ) )
361
+ public async System . Threading . Tasks . Task < Microsoft . Rest . Azure . AzureOperationResponse < Microsoft . Rest . Azure . IPage < ApplicationTypeVersionResource > > > ListWithHttpMessagesAsync ( string resourceGroupName , string clusterName , string applicationTypeName , System . Collections . Generic . Dictionary < string , System . Collections . Generic . List < string > > customHeaders = null , System . Threading . CancellationToken cancellationToken = default ( System . Threading . CancellationToken ) )
362
362
{
363
363
364
364
@@ -506,7 +506,7 @@ internal ApplicationTypeVersionsOperations (ServiceFabricManagementClient client
506
506
throw ex ;
507
507
}
508
508
// Create Result
509
- var _result = new Microsoft . Rest . Azure . AzureOperationResponse < ApplicationTypeVersionResourceList > ( ) ;
509
+ var _result = new Microsoft . Rest . Azure . AzureOperationResponse < Microsoft . Rest . Azure . IPage < ApplicationTypeVersionResource > > ( ) ;
510
510
_result . Request = _httpRequest ;
511
511
_result . Response = _httpResponse ;
512
512
@@ -520,7 +520,7 @@ internal ApplicationTypeVersionsOperations (ServiceFabricManagementClient client
520
520
_responseContent = await _httpResponse . Content . ReadAsStringAsync ( ) . ConfigureAwait ( false ) ;
521
521
try
522
522
{
523
- _result . Body = Microsoft . Rest . Serialization . SafeJsonConvert . DeserializeObject < ApplicationTypeVersionResourceList > ( _responseContent , this . Client . DeserializationSettings ) ;
523
+ _result . Body = Microsoft . Rest . Serialization . SafeJsonConvert . DeserializeObject < Page < ApplicationTypeVersionResource > > ( _responseContent , this . Client . DeserializationSettings ) ;
524
524
}
525
525
catch ( Newtonsoft . Json . JsonException ex )
526
526
{
@@ -992,6 +992,183 @@ internal ApplicationTypeVersionsOperations (ServiceFabricManagementClient client
992
992
993
993
994
994
995
+ }
996
+ /// <summary>
997
+ /// Gets all application type version resources created or in the process of being created in the Service Fabric application type name resource.
998
+ /// </summary>
999
+ /// <param name='nextPageLink'>
1000
+ /// The NextLink from the previous successful call to List operation.
1001
+ /// </param>
1002
+ /// <param name='customHeaders'>
1003
+ /// Headers that will be added to request.
1004
+ /// </param>
1005
+ /// <param name='cancellationToken'>
1006
+ /// The cancellation token.
1007
+ /// </param>
1008
+ /// <exception cref="Microsoft.Rest.Azure.CloudException">
1009
+ /// Thrown when the operation returned an invalid status code
1010
+ /// </exception>
1011
+ /// <exception cref="Microsoft.Rest.SerializationException">
1012
+ /// Thrown when unable to deserialize the response
1013
+ /// </exception>
1014
+ /// <exception cref="Microsoft.Rest.ValidationException">
1015
+ /// Thrown when a required parameter is null
1016
+ /// </exception>
1017
+ /// <exception cref="System.ArgumentNullException">
1018
+ /// Thrown when a required parameter is null
1019
+ /// </exception>
1020
+ /// <return>
1021
+ /// A response object containing the response body and response headers.
1022
+ /// </return>
1023
+ public async System . Threading . Tasks . Task < Microsoft . Rest . Azure . AzureOperationResponse < Microsoft . Rest . Azure . IPage < ApplicationTypeVersionResource > > > ListNextWithHttpMessagesAsync ( string nextPageLink , System . Collections . Generic . Dictionary < string , System . Collections . Generic . List < string > > customHeaders = null , System . Threading . CancellationToken cancellationToken = default ( System . Threading . CancellationToken ) )
1024
+ {
1025
+
1026
+ if ( nextPageLink == null )
1027
+ {
1028
+ throw new Microsoft . Rest . ValidationException ( Microsoft . Rest . ValidationRules . CannotBeNull , "nextPageLink" ) ;
1029
+ }
1030
+ // Tracing
1031
+ bool _shouldTrace = Microsoft . Rest . ServiceClientTracing . IsEnabled ;
1032
+ string _invocationId = null ;
1033
+ if ( _shouldTrace )
1034
+ {
1035
+ _invocationId = Microsoft . Rest . ServiceClientTracing . NextInvocationId . ToString ( ) ;
1036
+ System . Collections . Generic . Dictionary < string , object > tracingParameters = new System . Collections . Generic . Dictionary < string , object > ( ) ;
1037
+ tracingParameters . Add ( "nextPageLink" , nextPageLink ) ;
1038
+
1039
+
1040
+ tracingParameters . Add ( "cancellationToken" , cancellationToken ) ;
1041
+ Microsoft . Rest . ServiceClientTracing . Enter ( _invocationId , this , "ListNext" , tracingParameters ) ;
1042
+ }
1043
+ // Construct URL
1044
+ string _url = "{nextLink}" ;
1045
+ _url = _url . Replace ( "{nextLink}" , nextPageLink ) ;
1046
+
1047
+ System . Collections . Generic . List < string > _queryParameters = new System . Collections . Generic . List < string > ( ) ;
1048
+ if ( _queryParameters . Count > 0 )
1049
+ {
1050
+ _url += ( _url . Contains ( "?" ) ? "&" : "?" ) + string . Join ( "&" , _queryParameters ) ;
1051
+ }
1052
+ // Create HTTP transport objects
1053
+ var _httpRequest = new System . Net . Http . HttpRequestMessage ( ) ;
1054
+ System . Net . Http . HttpResponseMessage _httpResponse = null ;
1055
+ _httpRequest . Method = new System . Net . Http . HttpMethod ( "GET" ) ;
1056
+ _httpRequest . RequestUri = new System . Uri ( _url ) ;
1057
+ // Set Headers
1058
+ if ( this . Client . GenerateClientRequestId != null && this . Client . GenerateClientRequestId . Value )
1059
+ {
1060
+ _httpRequest . Headers . TryAddWithoutValidation ( "x-ms-client-request-id" , System . Guid . NewGuid ( ) . ToString ( ) ) ;
1061
+ }
1062
+ if ( this . Client . AcceptLanguage != null )
1063
+ {
1064
+ if ( _httpRequest . Headers . Contains ( "accept-language" ) )
1065
+ {
1066
+ _httpRequest . Headers . Remove ( "accept-language" ) ;
1067
+ }
1068
+ _httpRequest . Headers . TryAddWithoutValidation ( "accept-language" , this . Client . AcceptLanguage ) ;
1069
+ }
1070
+
1071
+ if ( customHeaders != null )
1072
+ {
1073
+ foreach ( var _header in customHeaders )
1074
+ {
1075
+ if ( _httpRequest . Headers . Contains ( _header . Key ) )
1076
+ {
1077
+ _httpRequest . Headers . Remove ( _header . Key ) ;
1078
+ }
1079
+ _httpRequest . Headers . TryAddWithoutValidation ( _header . Key , _header . Value ) ;
1080
+ }
1081
+ }
1082
+ // Serialize Request
1083
+ string _requestContent = null ;
1084
+ // Set Credentials
1085
+ if ( this . Client . Credentials != null )
1086
+ {
1087
+ cancellationToken . ThrowIfCancellationRequested ( ) ;
1088
+ await this . Client . Credentials . ProcessHttpRequestAsync ( _httpRequest , cancellationToken ) . ConfigureAwait ( false ) ;
1089
+ }
1090
+ // Send Request
1091
+ if ( _shouldTrace )
1092
+ {
1093
+ Microsoft . Rest . ServiceClientTracing . SendRequest ( _invocationId , _httpRequest ) ;
1094
+ }
1095
+ cancellationToken . ThrowIfCancellationRequested ( ) ;
1096
+ _httpResponse = await this . Client . HttpClient . SendAsync ( _httpRequest , cancellationToken ) . ConfigureAwait ( false ) ;
1097
+ if ( _shouldTrace )
1098
+ {
1099
+ Microsoft . Rest . ServiceClientTracing . ReceiveResponse ( _invocationId , _httpResponse ) ;
1100
+ }
1101
+
1102
+ System . Net . HttpStatusCode _statusCode = _httpResponse . StatusCode ;
1103
+ cancellationToken . ThrowIfCancellationRequested ( ) ;
1104
+ string _responseContent = null ;
1105
+
1106
+ if ( ( int ) _statusCode != 200 )
1107
+ {
1108
+ var ex = new ErrorModelException ( string . Format ( "Operation returned an invalid status code '{0}'" , _statusCode ) ) ;
1109
+ try
1110
+ {
1111
+ _responseContent = await _httpResponse . Content . ReadAsStringAsync ( ) . ConfigureAwait ( false ) ;
1112
+ ErrorModel _errorBody = Microsoft . Rest . Serialization . SafeJsonConvert . DeserializeObject < ErrorModel > ( _responseContent , this . Client . DeserializationSettings ) ;
1113
+ if ( _errorBody != null )
1114
+ {
1115
+ ex . Body = _errorBody ;
1116
+ }
1117
+ }
1118
+ catch ( Newtonsoft . Json . JsonException )
1119
+ {
1120
+ // Ignore the exception
1121
+ }
1122
+ ex . Request = new Microsoft . Rest . HttpRequestMessageWrapper ( _httpRequest , _requestContent ) ;
1123
+ ex . Response = new Microsoft . Rest . HttpResponseMessageWrapper ( _httpResponse , _responseContent ) ;
1124
+ if ( _shouldTrace )
1125
+ {
1126
+ Microsoft . Rest . ServiceClientTracing . Error ( _invocationId , ex ) ;
1127
+ }
1128
+ _httpRequest . Dispose ( ) ;
1129
+ if ( _httpResponse != null )
1130
+ {
1131
+ _httpResponse . Dispose ( ) ;
1132
+ }
1133
+ throw ex ;
1134
+ }
1135
+ // Create Result
1136
+ var _result = new Microsoft . Rest . Azure . AzureOperationResponse < Microsoft . Rest . Azure . IPage < ApplicationTypeVersionResource > > ( ) ;
1137
+ _result . Request = _httpRequest ;
1138
+ _result . Response = _httpResponse ;
1139
+
1140
+ if ( _httpResponse . Headers . Contains ( "x-ms-request-id" ) )
1141
+ {
1142
+ _result . RequestId = _httpResponse . Headers . GetValues ( "x-ms-request-id" ) . FirstOrDefault ( ) ;
1143
+ }
1144
+ // Deserialize Response
1145
+ if ( ( int ) _statusCode == 200 )
1146
+ {
1147
+ _responseContent = await _httpResponse . Content . ReadAsStringAsync ( ) . ConfigureAwait ( false ) ;
1148
+ try
1149
+ {
1150
+ _result . Body = Microsoft . Rest . Serialization . SafeJsonConvert . DeserializeObject < Page < ApplicationTypeVersionResource > > ( _responseContent , this . Client . DeserializationSettings ) ;
1151
+ }
1152
+ catch ( Newtonsoft . Json . JsonException ex )
1153
+ {
1154
+ _httpRequest . Dispose ( ) ;
1155
+ if ( _httpResponse != null )
1156
+ {
1157
+ _httpResponse . Dispose ( ) ;
1158
+ }
1159
+ throw new Microsoft . Rest . SerializationException ( "Unable to deserialize the response." , _responseContent , ex ) ;
1160
+ }
1161
+ }
1162
+ if ( _shouldTrace )
1163
+ {
1164
+ Microsoft . Rest . ServiceClientTracing . Exit ( _invocationId , _result ) ;
1165
+ }
1166
+ return _result ;
1167
+
1168
+
1169
+
1170
+
1171
+
995
1172
}
996
1173
}
997
1174
}
0 commit comments