public static GetLicenseResponse Unmarshall(UnmarshallerContext context) { GetLicenseResponse getLicenseResponse = new GetLicenseResponse(); getLicenseResponse.HttpResponse = context.HttpResponse; getLicenseResponse.RequestId = context.StringValue("GetLicense.RequestId"); getLicenseResponse.License = context.StringValue("GetLicense.License"); return(getLicenseResponse); }
public bool HasVideoPlayerPermission() { GetLicenseRequest request = new GetLicenseRequest { ClientId = _connectionService.ClientId }; GetLicenseResponse response = _connectionService.Execute <GetLicenseResponse>(request); return(response.LicensePermissions.UgcsVideoPlayer); }
/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { GetLicenseResponse response = new GetLicenseResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("License", targetDepth)) { var unmarshaller = LicenseUnmarshaller.Instance; response.License = unmarshaller.Unmarshall(context); continue; } } return(response); }