Esempio n. 1
0
            /// <summary>Assign License.</summary>
            /// <param name="LicenseAssignmentBody">The body of the request.</param>
            /// <param name="ProductId">Name for product</param>
            /// <param name="SkuId">Name for sku for which license would be
            /// revoked</param>
            /// <param name="UserId">email id or unique Id of the user</param>
            /// <param name="gShellServiceAccount">The optional email address the service account should impersonate.</param>
            public Google.Apis.Licensing.v1.Data.LicenseAssignment Update(Google.Apis.Licensing.v1.Data.LicenseAssignment LicenseAssignmentBody, string ProductId, string SkuId, string UserId, gShell.dotNet.Utilities.OAuth2.StandardQueryParameters StandardQueryParams = null)
            {
                var request = GetService().LicenseAssignments.Update(LicenseAssignmentBody, ProductId, SkuId, UserId);

                if (StandardQueryParams != null)
                {
                    request.Fields    = StandardQueryParams.fields;
                    request.QuotaUser = StandardQueryParams.quotaUser;
                    request.UserIp    = StandardQueryParams.userIp;
                }



                return(request.Execute());
            }
Esempio n. 2
0
        protected override void ProcessRecord()
        {
            if (string.IsNullOrWhiteSpace(NewProductId) &&
                string.IsNullOrWhiteSpace(NewSkuId) &&
                string.IsNullOrWhiteSpace(NewUserId))
            {
                WriteError(new ErrorRecord(new Exception(
                                               "Must supply at least one parameter for Set-GLicenseAssignment"),
                                           "", ErrorCategory.InvalidOperation, "GLicenseAssignment"));
            }

            var body = new Data.LicenseAssignment()
            {
                ProductId = NewProductId,
                SkuId     = NewSkuId,
                UserId    = NewUserId
            };

            if (ShouldProcess("Licensing", "Set-GLicenseAssignment"))
            {
                WriteObject(licenseAssignments.Patch(body, ProductId, SkuId, UserId, StandardQueryParams: StandardQueryParams));
            }
        }
Esempio n. 3
0
 /// <summary>Assign License.</summary>
 /// <param name="LicenseAssignmentBody">The body of the request.</param>
 /// <param name="ProductId">Name for product</param>
 /// <param name="SkuId">Name for sku for which license would be
 /// revoked</param>
 /// <param name="UserId">email id or unique Id of the user</param>
 public Google.Apis.Licensing.v1.Data.LicenseAssignment Update(Google.Apis.Licensing.v1.Data.LicenseAssignment LicenseAssignmentBody, string ProductId, string SkuId, string UserId, gShell.dotNet.Utilities.OAuth2.StandardQueryParameters StandardQueryParams = null)
 {
     return(mainBase.licenseAssignments.Update(LicenseAssignmentBody, ProductId, SkuId, UserId, StandardQueryParams));
 }