/*** Generated by streamline 0.10.17 (callbacks) - DO NOT EDIT ***/ var __rt=require('streamline/lib/callbacks/runtime').runtime(__filename, false),__func=__rt.__func,__cb=__rt.__cb; var __ = require("underscore");
















var AvailabilitySet = require("./../availabilityset/availabilitySet");

function VMAvailabilitySetProfile(cli, resourceGroupName, params, serviceClients) {
  this.cli = cli;
  this.resourceGroupName = resourceGroupName;
  this.params = params;
  this.serviceClients = serviceClients;};


__.extend(VMAvailabilitySetProfile.prototype, {
  generateAvailabilitySetProfile: function generateAvailabilitySetProfile__1(_) { var availabilitySet, availSetInfo, __this = this; var __frame = { name: "generateAvailabilitySetProfile__1", line: 28 }; return __func(_, this, arguments, generateAvailabilitySetProfile__1, 0, __frame, function __$generateAvailabilitySetProfile__1() {
      availabilitySet = new AvailabilitySet(__this.cli, __this.serviceClients, __this.resourceGroupName, __this.params);
      if (!availabilitySet.hasAnyAvailSetParameters(__this.params)) {
        return _(null, {
          profile: null,
          availSetInfo: null }); } ;



      return availabilitySet.createAvailSetIfRequired(__cb(_, __frame, 9, 41, function ___(__0, __1) { availSetInfo = __1;
        return _(null, {
          profile: {
            id: availSetInfo.profile.id },

          availSetInfo: availSetInfo }); }, true)); }); }});




module.exports = VMAvailabilitySetProfile;
