def sig_share_update(cmd, client, resource_group_name, gallery_name, subscription_ids=None, tenant_ids=None, op_type=None):
    from .vendored_sdks.azure_mgmt_compute.models._models_py3 import SharingProfileGroup, SharingUpdate, SharingProfileGroupTypes
    if (op_type != 'EnableCommunity'):
        if ((subscription_ids is None) and (tenant_ids is None)):
            raise RequiredArgumentMissingError('At least one of subscription ids or tenant ids must be provided')
    groups = []
    if subscription_ids:
        groups.append(SharingProfileGroup(type=SharingProfileGroupTypes.SUBSCRIPTIONS, ids=subscription_ids))
    if tenant_ids:
        groups.append(SharingProfileGroup(type=SharingProfileGroupTypes.AAD_TENANTS, ids=tenant_ids))
    sharing_update = SharingUpdate(operation_type=op_type, groups=groups)
    return client.begin_update(resource_group_name=resource_group_name, gallery_name=gallery_name, sharing_update=sharing_update)
def sig_share_update(cmd, client, resource_group_name, gallery_name, subscription_ids=None, tenant_ids=None, op_type=None):
    from .vendored_sdks.azure_mgmt_compute.models._models_py3 import SharingProfileGroup, SharingUpdate, SharingProfileGroupTypes
    if (op_type != 'EnableCommunity'):
        if ((subscription_ids is None) and (tenant_ids is None)):
            raise RequiredArgumentMissingError('At least one of subscription ids or tenant ids must be provided')
    groups = []
    if subscription_ids:
        groups.append(SharingProfileGroup(type=SharingProfileGroupTypes.SUBSCRIPTIONS, ids=subscription_ids))
    if tenant_ids:
        groups.append(SharingProfileGroup(type=SharingProfileGroupTypes.AAD_TENANTS, ids=tenant_ids))
    sharing_update = SharingUpdate(operation_type=op_type, groups=groups)
    return client.begin_update(resource_group_name=resource_group_name, gallery_name=gallery_name, sharing_update=sharing_update)